当前位置:  软件>C/C++软件

c-string转换工具集合 stringencoders

    来源:    发布时间:2015-02-05

    本文导语:  c-string转换工具集合,比标准实现快2倍以上(如果有的话)。——该项目被Google Chrome使用。 包括以下C字符串转换工具 base64, standard base64, web/url safe, with configurable alphabet base85 (good for http cookies) base16 (hex) ...

c-string转换工具集合,比标准实现快2倍以上(如果有的话)。——该项目被Google Chrome使用。

包括以下C字符串转换工具

  • base64, standard
  • base64, web/url safe, with configurable alphabet
  • base85 (good for http cookies)
  • base16 (hex)
  • base2 (ascii binary)
  • url escaping
  • javascript string escaping
  • fast number to string conversion, 4-22x faster than sprintf!
  • fast ascii upper/lower case conversion, 2-66x faster than stdlib! (yes, 66x faster)

And it's all wrapped up in a bow for you to use:

  • BSD License -- do what you want with it.
  • Standard clean ANSI C, will also compile as C99 and C++
  • C++ wrappers for std::string
  • Standard install: configure && make && make install
  • Extensive unit tests provided with >98% coverage.
  • Endian safe.
  • Performance test framework -- don't take my word, run it your self
  • Lots of in-code documentation
注意事项
  • This code might compile on windows. I tried to work around the lack of stdint and stdbool, but I can't test it out.
  • Also this code won't work on Sparc chips (Solaris) due to alignment issues. not hard to fix, but I don't have access to sparc machines
  • Works great on Mac and Linux.
  • No idea about iOS and ARM chips.

    
 
 

您可能感兴趣的文章:

 
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3