stringencoders - c-string转换工具集合


BSD
Linux
C/C++

软件简介

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.