basE91 vs Base64 簡易基準測試

3 min

language: ja bn en es hi pt ru zh-cn zh-tw

版本

詳情請執行 'base64 --help'。
alleycat:[haturatu]:~$ base64 --version
base64 (GNU coreutils) 9.5
Copyright (C) 2024 Free Software Foundation, Inc.
授權 GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

作者 Simon Josefsson。
alleycat:[haturatu]:~$ base91 --version
base91 0.6.0
Copyright (c) 2000-2006 Joachim Henke

基準測試

非常簡單的測試

alleycat:[haturatu]:~$ time for i in {1..10000}; do echo "test" | base91 ; done > 91

real    0m11.381s
user    0m10.460s
sys     0m5.118s
alleycat:[haturatu]:~$ time for i in {1..10000}; do echo "test" | base64 ; done > 64

real    0m11.985s
user    0m10.787s
sys     0m5.219s
alleycat:[haturatu]:~$ time for i in {1..10000}; do echo "test" | base91 ; done > 91

real    0m11.569s
user    0m10.640s
sys     0m5.071s
alleycat:[haturatu]:~$ time for i in {1..10000}; do echo "test" | base64 ; done > 64

real    0m11.864s
user    0m10.725s
sys     0m5.189s

背景

我在郵件列表存檔中發現了以下內容:
Bug#706078: ITP: base91 – base91 encoder/decoder

It amounts at most to 23% (versus 33% for base64) and can range down to 14%, which typically occurs on 0-byte blocks. This makes basE91 very useful for transferring larger files over binary insecure connections like e-mail or terminal lines.

這算是驗證嗎?

大家最喜歡的額外環節。
在瀏覽器中很難找到一個簡單的basE91生成器...所以提供了這個: basE91 Encode/Decode

Related Posts