LoginSignup
0
0

More than 5 years have passed since last update.

[unicode] boostのソースを色んなunicode符号化スキームでエンコードしてサイズを比較してみた

Posted at

対象文字列
boost-1-57-0のincludeディレクトリ内のソースを全て結合した文字列。
find * -type f | xargs cat
各エンコーディングでのファイルサイズは以下の通り

スキーム名 ファルサイズ(Byte)
UTF8 97371269
UTF16-LE 194741986
UTF16-BE 194741986
UTF32-LE 389483972
UTF32-BE 389483972

gzipとbzip2での圧縮の結果

スキーム名 gzip(Byte) gzip(圧縮率) bzip2(Byte) bzip2(圧縮率) gzip(秒) bzip2(秒)
UTF8 8626754 91.1% 6237814 93.6% 1.618 17.68
UTF16-LE 11393835 94.4% 6647416 96.6% 3.185 50.20
UTF16-BE 11393831 94.4% 6647409 96.6% 3.193 49.33
UTF32-LE 17569956 95.5% 7283199 98.1% 6.412 83.32
UTF32-BE 17569956 95.5% 7283186 98.1% 6.440 81.77

bzip2の圧縮率は凄いけど、計算時間も凄い。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0