高性能的C語言字符串轉換的集合
高性能的C語言字符串轉換的集合,通常比標準的實現快2倍。
包括:
- 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
HEY
- 此代碼可以在Windows上編譯。我試圖解決缺乏stdint和stdbool,但我無法測試出來。
- 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.
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!