Wednesday, 1 August 2012

compress string in bash / cygwin


$ echo "abcdefghijklmnopqrstuvwxyz" | gzip | base64
H4sIAKIJGVAAA0tMSk5JTUvPyMzKzsnNyy8oLCouKS0rr6is4gIA8u5LhxsAAAA=

$ echo "abcdefghijklmnopqrstuvwxyz" | lzip | base64
TFpJUAEMADCYiJg+y+JvNLNMEV8Z5L0XOjgBZqLRWXCS2EbNX///KSgAAPLuS4cbAAAAAAAAAD8AAAAAAAAA

$ echo "abcdefghijklmnopqrstuvwxyz" | bzip2 | base64
QlpoOTFBWSZTWd8dTX8AAADBgAAQP///8CAAMU0aANAABCAAAAaEY6EqWxrnwjKdK2vjOt874vi7kinChIb46mv4

$ echo "abcdefghijklmnopqrstuvwxyz" | bgzip | base64
H4sIBAAAAAAA/wYAQkMCADYAS0xKTklNS8/IzMrOyc3LLygsKi4pLSuvqKziAgDy7kuHGwAAAB+LCAQAAAAAAP8GAEJDAgAbAAMAAAAAAAAAAAA=

$ echo "abcdefghijklmnopqrstuvwxyz" | lzop | base64
iUxaTwANChoKEDAgYAlAAQUDAAANAAAAAFAu+qoAAAAAACduA0IAAAAbAAAAG5uwCyphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5egoAAAAA

$ echo "abcdefghijklmnopqrstuvwxyz" | lzop -9 | base64
iUxaTwANChoKEDAgYAlAAwkDAAANAAAAAFAu+s4AAAAAACi0A2wAAAAbAAAAG5uwCyphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5egoAAAAA


$ echo "abcdefghijklmnopqrstuvwxyz" | lzma | base64
XQAAgAD//////////wAwmIiYPsvibzSzTBFfGeS9Fzo4AWai0VlwkthGzV///ykoAAA=

xz (lzma2)

$ echo "abcdefghijklmnopqrstuvwxyz" | xz | base64
/Td6WFoAAATm1rRGAgAhARYAAAB0L+WjAQAaYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoKAACF6VxPQfpCLAABMxv3GYheH7bzfQEAAAAABFla

$ echo "abcdefghijklmnopqrstuvwxyz" | xz -9 -e | base64
/Td6WFoAAATm1rRGAgAhARwAAAAQz1jMAQAaYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoKAACF6VxPQfpCLAABMxv3GYheH7bzfQEAAAAABFla



No comments:

Labels

Search This Blog