Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
JSON vs MsgPack using Gzip + LZ4
Original tweet size in JSON 2624 Msgpack = 1817 Gzip + Json = 1058 Gzip + Msgpack = 1116 LZ4 + Json = 1628 LZ4 + Msgpack = 1361
Original tweet size in JSON 1863 Msgpack = 1443 Gzip + Json = 0783 Gzip + Msgpack = 0835 LZ4 + Json = 1153 LZ4 + Msgpack = 1040
Original tweet size in JSON 2074 Msgpack = 1670 Gzip + Json = 0842 Gzip + Msgpack = 0894 LZ4 + Json = 1229 LZ4 + Msgpack = 1139
Original tweet size in JSON 2025 Msgpack = 1617 Gzip + Json = 0845 Gzip + Msgpack = 0895 LZ4 + Json = 1238 LZ4 + Msgpack = 1143
Original tweet size in JSON 2069 Msgpack = 1663 Gzip + Json = 0846 Gzip + Msgpack = 0901 LZ4 + Json = 1243 LZ4 + Msgpack = 1164
Original tweet size in JSON 2035 Msgpack = 1634 Gzip + Json = 0852 Gzip + Msgpack = 0907 LZ4 + Json = 1247 LZ4 + Msgpack = 1167
Original tweet size in JSON 1988 Msgpack = 1464 Gzip + Json = 0804 Gzip + Msgpack = 0862 LZ4 + Json = 1220 LZ4 + Msgpack = 1061
Original tweet size in JSON 1910 Msgpack = 1502 Gzip + Json = 0775 Gzip + Msgpack = 0832 LZ4 + Json = 1154 LZ4 + Msgpack = 1060
Original tweet size in JSON 2002 Msgpack = 1592 Gzip + Json = 0778 Gzip + Msgpack = 0840 LZ4 + Json = 1151 LZ4 + Msgpack = 1069
Original tweet size in JSON 2029 Msgpack = 1626 Gzip + Json = 0827 Gzip + Msgpack = 0875 LZ4 + Json = 1216 LZ4 + Msgpack = 1133
Original tweet size in JSON 2073 Msgpack = 1665 Gzip + Json = 0892 Gzip + Msgpack = 0938 LZ4 + Json = 1324 LZ4 + Msgpack = 1227
Original tweet size in JSON 2193 Msgpack = 1778 Gzip + Json = 0964 Gzip + Msgpack = 1016 LZ4 + Json = 1378 LZ4 + Msgpack = 1286
Original tweet size in JSON 2482 Msgpack = 1747 Gzip + Json = 0976 Gzip + Msgpack = 1036 LZ4 + Json = 1488 LZ4 + Msgpack = 1250
Original tweet size in JSON 2026 Msgpack = 1619 Gzip + Json = 0839 Gzip + Msgpack = 0894 LZ4 + Json = 1229 LZ4 + Msgpack = 1141
Original tweet size in JSON 1983 Msgpack = 1573 Gzip + Json = 0842 Gzip + Msgpack = 0894 LZ4 + Json = 1230 LZ4 + Msgpack = 1140
Original tweet size in JSON 1788 Msgpack = 1375 Gzip + Json = 0683 Gzip + Msgpack = 0732 LZ4 + Json = 1024 LZ4 + Msgpack = 0947
Original tweet size in JSON 1963 Msgpack = 1567 Gzip + Json = 0822 Gzip + Msgpack = 0877 LZ4 + Json = 1227 LZ4 + Msgpack = 1149
Original tweet size in JSON 2249 Msgpack = 1764 Gzip + Json = 0959 Gzip + Msgpack = 1016 LZ4 + Json = 1414 LZ4 + Msgpack = 1284
Original tweet size in JSON 2213 Msgpack = 1814 Gzip + Json = 0960 Gzip + Msgpack = 1013 LZ4 + Json = 1385 LZ4 + Msgpack = 1302
Original tweet size in JSON 1962 Msgpack = 1561 Gzip + Json = 0810 Gzip + Msgpack = 0863 LZ4 + Json = 1208 LZ4 + Msgpack = 1122
Original tweet size in JSON 2140 Msgpack = 1733 Gzip + Json = 0911 Gzip + Msgpack = 0962 LZ4 + Json = 1320 LZ4 + Msgpack = 1237
Original tweet size in JSON 2152 Msgpack = 1745 Gzip + Json = 0916 Gzip + Msgpack = 0971 LZ4 + Json = 1333 LZ4 + Msgpack = 1244
Original tweet size in JSON 2486 Msgpack = 1825 Gzip + Json = 1048 Gzip + Msgpack = 1115 LZ4 + Json = 1569 LZ4 + Msgpack = 1362
Original tweet size in JSON 3282 Msgpack = 2180 Gzip + Json = 1329 Gzip + Msgpack = 1385 LZ4 + Json = 2061 LZ4 + Msgpack = 1661
Original tweet size in JSON 2090 Msgpack = 1698 Gzip + Json = 0910 Gzip + Msgpack = 0970 LZ4 + Json = 1325 LZ4 + Msgpack = 1240
Original tweet size in JSON 1986 Msgpack = 1580 Gzip + Json = 0849 Gzip + Msgpack = 0894 LZ4 + Json = 1253 LZ4 + Msgpack = 1154
Original tweet size in JSON 1939 Msgpack = 1529 Gzip + Json = 0762 Gzip + Msgpack = 0810 LZ4 + Json = 1122 LZ4 + Msgpack = 1043
Original tweet size in JSON 1917 Msgpack = 1508 Gzip + Json = 0775 Gzip + Msgpack = 0824 LZ4 + Json = 1134 LZ4 + Msgpack = 1052
Original tweet size in JSON 2018 Msgpack = 1601 Gzip + Json = 0833 Gzip + Msgpack = 0897 LZ4 + Json = 1240 LZ4 + Msgpack = 1136
Original tweet size in JSON 1967 Msgpack = 1576 Gzip + Json = 0830 Gzip + Msgpack = 0891 LZ4 + Json = 1217 LZ4 + Msgpack = 1145
Original tweet size in JSON 2464 Msgpack = 1771 Gzip + Json = 0964 Gzip + Msgpack = 1025 LZ4 + Json = 1472 LZ4 + Msgpack = 1270
Original tweet size in JSON 2090 Msgpack = 1681 Gzip + Json = 0888 Gzip + Msgpack = 0948 LZ4 + Json = 1287 LZ4 + Msgpack = 1199
Original tweet size in JSON 1772 Msgpack = 1368 Gzip + Json = 0712 Gzip + Msgpack = 0761 LZ4 + Json = 1066 LZ4 + Msgpack = 0976
Original tweet size in JSON 2164 Msgpack = 1766 Gzip + Json = 0922 Gzip + Msgpack = 0982 LZ4 + Json = 1343 LZ4 + Msgpack = 1265
Original tweet size in JSON 2122 Msgpack = 1703 Gzip + Json = 0882 Gzip + Msgpack = 0932 LZ4 + Json = 1284 LZ4 + Msgpack = 1191
Original tweet size in JSON 1905 Msgpack = 1502 Gzip + Json = 0799 Gzip + Msgpack = 0851 LZ4 + Json = 1164 LZ4 + Msgpack = 1074
Original tweet size in JSON 2133 Msgpack = 1716 Gzip + Json = 0951 Gzip + Msgpack = 1010 LZ4 + Json = 1396 LZ4 + Msgpack = 1296
Original tweet size in JSON 2230 Msgpack = 1802 Gzip + Json = 0980 Gzip + Msgpack = 1040 LZ4 + Json = 1412 LZ4 + Msgpack = 1309
Original tweet size in JSON 2607 Msgpack = 1864 Gzip + Json = 1067 Gzip + Msgpack = 1145 LZ4 + Json = 1629 LZ4 + Msgpack = 1387
Original tweet size in JSON 1990 Msgpack = 1568 Gzip + Json = 0799 Gzip + Msgpack = 0864 LZ4 + Json = 1164 LZ4 + Msgpack = 1082
Original tweet size in JSON 1959 Msgpack = 1562 Gzip + Json = 0800 Gzip + Msgpack = 0850 LZ4 + Json = 1173 LZ4 + Msgpack = 1095
Original tweet size in JSON 2365 Msgpack = 1675 Gzip + Json = 0948 Gzip + Msgpack = 1015 LZ4 + Json = 1462 LZ4 + Msgpack = 1230
Original tweet size in JSON 2064 Msgpack = 1668 Gzip + Json = 0908 Gzip + Msgpack = 0967 LZ4 + Json = 1344 LZ4 + Msgpack = 1253
Original tweet size in JSON 2035 Msgpack = 1624 Gzip + Json = 0838 Gzip + Msgpack = 0889 LZ4 + Json = 1245 LZ4 + Msgpack = 1156
Original tweet size in JSON 2065 Msgpack = 1665 Gzip + Json = 0871 Gzip + Msgpack = 0927 LZ4 + Json = 1275 LZ4 + Msgpack = 1194
Original tweet size in JSON 1808 Msgpack = 1404 Gzip + Json = 0730 Gzip + Msgpack = 0776 LZ4 + Json = 1090 LZ4 + Msgpack = 0998
Original tweet size in JSON 2024 Msgpack = 1628 Gzip + Json = 0841 Gzip + Msgpack = 0896 LZ4 + Json = 1234 LZ4 + Msgpack = 1163
Original tweet size in JSON 2087 Msgpack = 1567 Gzip + Json = 0850 Gzip + Msgpack = 0916 LZ4 + Json = 1297 LZ4 + Msgpack = 1141
Original tweet size in JSON 2221 Msgpack = 1603 Gzip + Json = 0898 Gzip + Msgpack = 0962 LZ4 + Json = 1357 LZ4 + Msgpack = 1175
Original tweet size in JSON 2078 Msgpack = 1677 Gzip + Json = 0859 Gzip + Msgpack = 0909 LZ4 + Json = 1264 LZ4 + Msgpack = 1176
Original tweet size in JSON 2677 Msgpack = 1738 Gzip + Json = 0988 Gzip + Msgpack = 1021 LZ4 + Json = 1575 LZ4 + Msgpack = 1294
Original tweet size in JSON 1972 Msgpack = 1571 Gzip + Json = 0832 Gzip + Msgpack = 0882 LZ4 + Json = 1220 LZ4 + Msgpack = 1125
Original tweet size in JSON 2177 Msgpack = 1775 Gzip + Json = 0933 Gzip + Msgpack = 0988 LZ4 + Json = 1362 LZ4 + Msgpack = 1276
Original tweet size in JSON 2067 Msgpack = 1638 Gzip + Json = 0842 Gzip + Msgpack = 0898 LZ4 + Json = 1238 LZ4 + Msgpack = 1151
Original tweet size in JSON 3123 Msgpack = 2039 Gzip + Json = 1190 Gzip + Msgpack = 1240 LZ4 + Json = 1889 LZ4 + Msgpack = 1532
Original tweet size in JSON 2072 Msgpack = 1590 Gzip + Json = 0863 Gzip + Msgpack = 0911 LZ4 + Json = 1279 LZ4 + Msgpack = 1151
Original tweet size in JSON 2219 Msgpack = 1784 Gzip + Json = 0941 Gzip + Msgpack = 1004 LZ4 + Json = 1346 LZ4 + Msgpack = 1275
Original tweet size in JSON 2495 Msgpack = 1968 Gzip + Json = 1036 Gzip + Msgpack = 1103 LZ4 + Json = 1507 LZ4 + Msgpack = 1385
Original tweet size in JSON 2146 Msgpack = 1741 Gzip + Json = 0919 Gzip + Msgpack = 0980 LZ4 + Json = 1344 LZ4 + Msgpack = 1258
Original tweet size in JSON 2104 Msgpack = 1699 Gzip + Json = 0911 Gzip + Msgpack = 0964 LZ4 + Json = 1325 LZ4 + Msgpack = 1239
Original tweet size in JSON 1907 Msgpack = 1504 Gzip + Json = 0792 Gzip + Msgpack = 0846 LZ4 + Json = 1184 LZ4 + Msgpack = 1096
Original tweet size in JSON 2054 Msgpack = 1557 Gzip + Json = 0825 Gzip + Msgpack = 0890 LZ4 + Json = 1242 LZ4 + Msgpack = 1091
Original tweet size in JSON 2202 Msgpack = 1781 Gzip + Json = 0957 Gzip + Msgpack = 1010 LZ4 + Json = 1391 LZ4 + Msgpack = 1289
Original tweet size in JSON 2200 Msgpack = 1786 Gzip + Json = 0949 Gzip + Msgpack = 1005 LZ4 + Json = 1361 LZ4 + Msgpack = 1280
Original tweet size in JSON 2199 Msgpack = 1809 Gzip + Json = 0934 Gzip + Msgpack = 0999 LZ4 + Json = 1374 LZ4 + Msgpack = 1307
Original tweet size in JSON 1838 Msgpack = 1432 Gzip + Json = 0738 Gzip + Msgpack = 0777 LZ4 + Json = 1088 LZ4 + Msgpack = 1004
Original tweet size in JSON 1954 Msgpack = 1539 Gzip + Json = 0808 Gzip + Msgpack = 0857 LZ4 + Json = 1170 LZ4 + Msgpack = 1081
Original tweet size in JSON 3114 Msgpack = 2061 Gzip + Json = 1237 Gzip + Msgpack = 1276 LZ4 + Json = 1904 LZ4 + Msgpack = 1553
Original tweet size in JSON 2759 Msgpack = 1895 Gzip + Json = 1131 Gzip + Msgpack = 1187 LZ4 + Json = 1750 LZ4 + Msgpack = 1454
Original tweet size in JSON 2062 Msgpack = 1663 Gzip + Json = 0840 Gzip + Msgpack = 0894 LZ4 + Json = 1205 LZ4 + Msgpack = 1132
Original tweet size in JSON 2000 Msgpack = 1602 Gzip + Json = 0827 Gzip + Msgpack = 0885 LZ4 + Json = 1204 LZ4 + Msgpack = 1126
Original tweet size in JSON 2066 Msgpack = 1673 Gzip + Json = 0865 Gzip + Msgpack = 0924 LZ4 + Json = 1263 LZ4 + Msgpack = 1186
Original tweet size in JSON 2562 Msgpack = 1872 Gzip + Json = 1057 Gzip + Msgpack = 1124 LZ4 + Json = 1574 LZ4 + Msgpack = 1353
Original tweet size in JSON 3375 Msgpack = 2231 Gzip + Json = 1326 Gzip + Msgpack = 1373 LZ4 + Json = 2100 LZ4 + Msgpack = 1710
Original tweet size in JSON 2523 Msgpack = 1873 Gzip + Json = 0996 Gzip + Msgpack = 1060 LZ4 + Json = 1507 LZ4 + Msgpack = 1330
Original tweet size in JSON 2242 Msgpack = 1831 Gzip + Json = 0977 Gzip + Msgpack = 1037 LZ4 + Json = 1402 LZ4 + Msgpack = 1324
Original tweet size in JSON 2105 Msgpack = 1711 Gzip + Json = 0916 Gzip + Msgpack = 0975 LZ4 + Json = 1315 LZ4 + Msgpack = 1238
Original tweet size in JSON 1941 Msgpack = 1546 Gzip + Json = 0803 Gzip + Msgpack = 0869 LZ4 + Json = 1184 LZ4 + Msgpack = 1119
Original tweet size in JSON 1949 Msgpack = 1556 Gzip + Json = 0788 Gzip + Msgpack = 0844 LZ4 + Json = 1166 LZ4 + Msgpack = 1086
Original tweet size in JSON 2385 Msgpack = 1697 Gzip + Json = 0932 Gzip + Msgpack = 1001 LZ4 + Json = 1446 LZ4 + Msgpack = 1230
Original tweet size in JSON 2044 Msgpack = 1581 Gzip + Json = 0861 Gzip + Msgpack = 0912 LZ4 + Json = 1268 LZ4 + Msgpack = 1150
Original tweet size in JSON 2074 Msgpack = 1666 Gzip + Json = 0876 Gzip + Msgpack = 0940 LZ4 + Json = 1259 LZ4 + Msgpack = 1177
Original tweet size in JSON 2207 Msgpack = 1759 Gzip + Json = 0939 Gzip + Msgpack = 0997 LZ4 + Json = 1366 LZ4 + Msgpack = 1246
Original tweet size in JSON 2542 Msgpack = 1907 Gzip + Json = 1038 Gzip + Msgpack = 1111 LZ4 + Json = 1537 LZ4 + Msgpack = 1359
Original tweet size in JSON 2140 Msgpack = 1748 Gzip + Json = 0908 Gzip + Msgpack = 0962 LZ4 + Json = 1345 LZ4 + Msgpack = 1267
Original tweet size in JSON 1848 Msgpack = 1454 Gzip + Json = 0753 Gzip + Msgpack = 0806 LZ4 + Json = 1132 LZ4 + Msgpack = 1052
Original tweet size in JSON 2752 Msgpack = 1918 Gzip + Json = 1126 Gzip + Msgpack = 1194 LZ4 + Json = 1730 LZ4 + Msgpack = 1440
Original tweet size in JSON 1974 Msgpack = 1564 Gzip + Json = 0800 Gzip + Msgpack = 0853 LZ4 + Json = 1182 LZ4 + Msgpack = 1100
Original tweet size in JSON 2055 Msgpack = 1658 Gzip + Json = 0877 Gzip + Msgpack = 0935 LZ4 + Json = 1263 LZ4 + Msgpack = 1193
Original tweet size in JSON 2633 Msgpack = 1821 Gzip + Json = 1056 Gzip + Msgpack = 1109 LZ4 + Json = 1614 LZ4 + Msgpack = 1337
Original tweet size in JSON 2012 Msgpack = 1607 Gzip + Json = 0821 Gzip + Msgpack = 0874 LZ4 + Json = 1223 LZ4 + Msgpack = 1141
Original tweet size in JSON 2153 Msgpack = 1592 Gzip + Json = 0903 Gzip + Msgpack = 0962 LZ4 + Json = 1351 LZ4 + Msgpack = 1171
Original tweet size in JSON 2164 Msgpack = 1766 Gzip + Json = 0922 Gzip + Msgpack = 0982 LZ4 + Json = 1343 LZ4 + Msgpack = 1265
Original tweet size in JSON 2122 Msgpack = 1703 Gzip + Json = 0882 Gzip + Msgpack = 0932 LZ4 + Json = 1284 LZ4 + Msgpack = 1191
Original tweet size in JSON 1905 Msgpack = 1502 Gzip + Json = 0799 Gzip + Msgpack = 0851 LZ4 + Json = 1164 LZ4 + Msgpack = 1074
Original tweet size in JSON 2133 Msgpack = 1716 Gzip + Json = 0951 Gzip + Msgpack = 1010 LZ4 + Json = 1396 LZ4 + Msgpack = 1296
Original tweet size in JSON 2230 Msgpack = 1802 Gzip + Json = 0980 Gzip + Msgpack = 1040 LZ4 + Json = 1412 LZ4 + Msgpack = 1309
Original tweet size in JSON 2607 Msgpack = 1864 Gzip + Json = 1067 Gzip + Msgpack = 1145 LZ4 + Json = 1629 LZ4 + Msgpack = 1387
Original tweet size in JSON 1990 Msgpack = 1568 Gzip + Json = 0799 Gzip + Msgpack = 0864 LZ4 + Json = 1164 LZ4 + Msgpack = 1082
Original tweet size in JSON 2093 Msgpack = 1676 Gzip + Json = 0837 Gzip + Msgpack = 0894 LZ4 + Json = 1227 LZ4 + Msgpack = 1147
Original tweet size in JSON 1869 Msgpack = 1457 Gzip + Json = 0748 Gzip + Msgpack = 0797 LZ4 + Json = 1087 LZ4 + Msgpack = 0999
Original tweet size in JSON 2153 Msgpack = 1746 Gzip + Json = 0948 Gzip + Msgpack = 1005 LZ4 + Json = 1373 LZ4 + Msgpack = 1286
Original tweet size in JSON 2047 Msgpack = 1628 Gzip + Json = 0848 Gzip + Msgpack = 0899 LZ4 + Json = 1270 LZ4 + Msgpack = 1183
Original tweet size in JSON 2057 Msgpack = 1629 Gzip + Json = 0854 Gzip + Msgpack = 0917 LZ4 + Json = 1273 LZ4 + Msgpack = 1190
Original tweet size in JSON 2149 Msgpack = 1741 Gzip + Json = 0969 Gzip + Msgpack = 1029 LZ4 + Json = 1399 LZ4 + Msgpack = 1307
Original tweet size in JSON 2121 Msgpack = 1711 Gzip + Json = 0908 Gzip + Msgpack = 0953 LZ4 + Json = 1320 LZ4 + Msgpack = 1222
Original tweet size in JSON 1975 Msgpack = 1578 Gzip + Json = 0805 Gzip + Msgpack = 0858 LZ4 + Json = 1187 LZ4 + Msgpack = 1107
Original tweet size in JSON 2119 Msgpack = 1720 Gzip + Json = 0925 Gzip + Msgpack = 0981 LZ4 + Json = 1325 LZ4 + Msgpack = 1244
Original tweet size in JSON 1888 Msgpack = 1486 Gzip + Json = 0784 Gzip + Msgpack = 0843 LZ4 + Json = 1141 LZ4 + Msgpack = 1067
Original tweet size in JSON 2471 Msgpack = 1755 Gzip + Json = 0973 Gzip + Msgpack = 1040 LZ4 + Json = 1481 LZ4 + Msgpack = 1273
Original tweet size in JSON 1916 Msgpack = 1518 Gzip + Json = 0764 Gzip + Msgpack = 0815 LZ4 + Json = 1127 LZ4 + Msgpack = 1046
Original tweet size in JSON 2097 Msgpack = 1689 Gzip + Json = 0879 Gzip + Msgpack = 0942 LZ4 + Json = 1316 LZ4 + Msgpack = 1238
Original tweet size in JSON 1866 Msgpack = 1468 Gzip + Json = 0720 Gzip + Msgpack = 0773 LZ4 + Json = 1071 LZ4 + Msgpack = 0999
Original tweet size in JSON 2302 Msgpack = 1790 Gzip + Json = 0929 Gzip + Msgpack = 0996 LZ4 + Json = 1367 LZ4 + Msgpack = 1258
Original tweet size in JSON 1826 Msgpack = 1417 Gzip + Json = 0716 Gzip + Msgpack = 0761 LZ4 + Json = 1067 LZ4 + Msgpack = 0981
Original tweet size in JSON 2202 Msgpack = 1717 Gzip + Json = 0906 Gzip + Msgpack = 0951 LZ4 + Json = 1335 LZ4 + Msgpack = 1229
Original tweet size in JSON 2102 Msgpack = 1690 Gzip + Json = 0887 Gzip + Msgpack = 0941 LZ4 + Json = 1307 LZ4 + Msgpack = 1217
Original tweet size in JSON 2123 Msgpack = 1722 Gzip + Json = 0888 Gzip + Msgpack = 0951 LZ4 + Json = 1303 LZ4 + Msgpack = 1216
Original tweet size in JSON 1972 Msgpack = 1565 Gzip + Json = 0813 Gzip + Msgpack = 0865 LZ4 + Json = 1211 LZ4 + Msgpack = 1124
Original tweet size in JSON 2547 Msgpack = 2075 Gzip + Json = 1131 Gzip + Msgpack = 1203 LZ4 + Json = 1628 LZ4 + Msgpack = 1522
Original tweet size in JSON 2177 Msgpack = 1737 Gzip + Json = 0913 Gzip + Msgpack = 0967 LZ4 + Json = 1331 LZ4 + Msgpack = 1230
Original tweet size in JSON 1857 Msgpack = 1450 Gzip + Json = 0705 Gzip + Msgpack = 0755 LZ4 + Json = 1043 LZ4 + Msgpack = 0979
Original tweet size in JSON 2109 Msgpack = 1707 Gzip + Json = 0882 Gzip + Msgpack = 0948 LZ4 + Json = 1286 LZ4 + Msgpack = 1208
Original tweet size in JSON 2118 Msgpack = 1692 Gzip + Json = 0904 Gzip + Msgpack = 0960 LZ4 + Json = 1311 LZ4 + Msgpack = 1229
Original tweet size in JSON 1940 Msgpack = 1540 Gzip + Json = 0788 Gzip + Msgpack = 0852 LZ4 + Json = 1162 LZ4 + Msgpack = 1091
Original tweet size in JSON 2102 Msgpack = 1696 Gzip + Json = 0913 Gzip + Msgpack = 0970 LZ4 + Json = 1298 LZ4 + Msgpack = 1220
Original tweet size in JSON 2030 Msgpack = 1637 Gzip + Json = 0857 Gzip + Msgpack = 0910 LZ4 + Json = 1270 LZ4 + Msgpack = 1174
Original tweet size in JSON 2816 Msgpack = 1937 Gzip + Json = 1042 Gzip + Msgpack = 1097 LZ4 + Json = 1590 LZ4 + Msgpack = 1345
Original tweet size in JSON 2015 Msgpack = 1617 Gzip + Json = 0827 Gzip + Msgpack = 0884 LZ4 + Json = 1238 LZ4 + Msgpack = 1152
Original tweet size in JSON 2207 Msgpack = 1656 Gzip + Json = 0898 Gzip + Msgpack = 0965 LZ4 + Json = 1341 LZ4 + Msgpack = 1175
Original tweet size in JSON 1850 Msgpack = 1436 Gzip + Json = 0698 Gzip + Msgpack = 0747 LZ4 + Json = 1037 LZ4 + Msgpack = 0963
Original tweet size in JSON 3451 Msgpack = 2049 Gzip + Json = 1090 Gzip + Msgpack = 1122 LZ4 + Json = 1813 LZ4 + Msgpack = 1458
Original tweet size in JSON 2812 Msgpack = 1876 Gzip + Json = 1108 Gzip + Msgpack = 1158 LZ4 + Json = 1730 LZ4 + Msgpack = 1401
Original tweet size in JSON 2919 Msgpack = 1928 Gzip + Json = 0984 Gzip + Msgpack = 1026 LZ4 + Json = 1557 LZ4 + Msgpack = 1320
Original tweet size in JSON 1904 Msgpack = 1447 Gzip + Json = 0764 Gzip + Msgpack = 0822 LZ4 + Json = 1135 LZ4 + Msgpack = 1032
Original tweet size in JSON 1935 Msgpack = 1530 Gzip + Json = 0779 Gzip + Msgpack = 0834 LZ4 + Json = 1150 LZ4 + Msgpack = 1071
Original tweet size in JSON 1950 Msgpack = 1553 Gzip + Json = 0825 Gzip + Msgpack = 0871 LZ4 + Json = 1221 LZ4 + Msgpack = 1137
Original tweet size in JSON 2043 Msgpack = 1637 Gzip + Json = 0860 Gzip + Msgpack = 0911 LZ4 + Json = 1245 LZ4 + Msgpack = 1153
Original tweet size in JSON 1965 Msgpack = 1570 Gzip + Json = 0820 Gzip + Msgpack = 0877 LZ4 + Json = 1188 LZ4 + Msgpack = 1109
Original tweet size in JSON 2086 Msgpack = 1680 Gzip + Json = 0866 Gzip + Msgpack = 0924 LZ4 + Json = 1263 LZ4 + Msgpack = 1185
Original tweet size in JSON 2226 Msgpack = 1498 Gzip + Json = 0764 Gzip + Msgpack = 0816 LZ4 + Json = 1200 LZ4 + Msgpack = 1031
Original tweet size in JSON 2257 Msgpack = 1838 Gzip + Json = 0961 Gzip + Msgpack = 1005 LZ4 + Json = 1399 LZ4 + Msgpack = 1299
Original tweet size in JSON 2090 Msgpack = 1686 Gzip + Json = 0868 Gzip + Msgpack = 0914 LZ4 + Json = 1272 LZ4 + Msgpack = 1177
Original tweet size in JSON 2103 Msgpack = 1690 Gzip + Json = 0891 Gzip + Msgpack = 0946 LZ4 + Json = 1300 LZ4 + Msgpack = 1213
Original tweet size in JSON 1946 Msgpack = 1534 Gzip + Json = 0819 Gzip + Msgpack = 0866 LZ4 + Json = 1217 LZ4 + Msgpack = 1119
Original tweet size in JSON 2019 Msgpack = 1603 Gzip + Json = 0823 Gzip + Msgpack = 0872 LZ4 + Json = 1223 LZ4 + Msgpack = 1140
Original tweet size in JSON 2519 Msgpack = 1791 Gzip + Json = 1051 Gzip + Msgpack = 1110 LZ4 + Json = 1616 LZ4 + Msgpack = 1353
Original tweet size in JSON 2455 Msgpack = 1751 Gzip + Json = 1032 Gzip + Msgpack = 1089 LZ4 + Json = 1548 LZ4 + Msgpack = 1306
Original tweet size in JSON 2096 Msgpack = 1704 Gzip + Json = 0883 Gzip + Msgpack = 0943 LZ4 + Json = 1302 LZ4 + Msgpack = 1228
Original tweet size in JSON 2062 Msgpack = 1659 Gzip + Json = 0865 Gzip + Msgpack = 0927 LZ4 + Json = 1258 LZ4 + Msgpack = 1186
Original tweet size in JSON 2007 Msgpack = 1607 Gzip + Json = 0832 Gzip + Msgpack = 0879 LZ4 + Json = 1244 LZ4 + Msgpack = 1157
Original tweet size in JSON 1931 Msgpack = 1517 Gzip + Json = 0805 Gzip + Msgpack = 0857 LZ4 + Json = 1207 LZ4 + Msgpack = 1112
Original tweet size in JSON 2508 Msgpack = 1767 Gzip + Json = 0990 Gzip + Msgpack = 1049 LZ4 + Json = 1510 LZ4 + Msgpack = 1287
Original tweet size in JSON 2104 Msgpack = 1701 Gzip + Json = 0891 Gzip + Msgpack = 0936 LZ4 + Json = 1295 LZ4 + Msgpack = 1208
Original tweet size in JSON 2814 Msgpack = 1986 Gzip + Json = 1055 Gzip + Msgpack = 1111 LZ4 + Json = 1652 LZ4 + Msgpack = 1434
Original tweet size in JSON 2103 Msgpack = 1636 Gzip + Json = 0853 Gzip + Msgpack = 0926 LZ4 + Json = 1274 LZ4 + Msgpack = 1168
Original tweet size in JSON 2051 Msgpack = 1647 Gzip + Json = 0855 Gzip + Msgpack = 0906 LZ4 + Json = 1254 LZ4 + Msgpack = 1171
Original tweet size in JSON 1885 Msgpack = 1491 Gzip + Json = 0757 Gzip + Msgpack = 0810 LZ4 + Json = 1127 LZ4 + Msgpack = 1042
Original tweet size in JSON 1988 Msgpack = 1591 Gzip + Json = 0815 Gzip + Msgpack = 0872 LZ4 + Json = 1188 LZ4 + Msgpack = 1111
Original tweet size in JSON 2055 Msgpack = 1648 Gzip + Json = 0866 Gzip + Msgpack = 0918 LZ4 + Json = 1261 LZ4 + Msgpack = 1187
Original tweet size in JSON 2114 Msgpack = 1717 Gzip + Json = 0905 Gzip + Msgpack = 0965 LZ4 + Json = 1314 LZ4 + Msgpack = 1240
Original tweet size in JSON 2078 Msgpack = 1623 Gzip + Json = 0878 Gzip + Msgpack = 0927 LZ4 + Json = 1254 LZ4 + Msgpack = 1153
Original tweet size in JSON 2547 Msgpack = 2075 Gzip + Json = 1131 Gzip + Msgpack = 1203 LZ4 + Json = 1628 LZ4 + Msgpack = 1522
Original tweet size in JSON 2177 Msgpack = 1737 Gzip + Json = 0913 Gzip + Msgpack = 0967 LZ4 + Json = 1331 LZ4 + Msgpack = 1230
Original tweet size in JSON 1857 Msgpack = 1450 Gzip + Json = 0705 Gzip + Msgpack = 0755 LZ4 + Json = 1043 LZ4 + Msgpack = 0979
Original tweet size in JSON 2109 Msgpack = 1707 Gzip + Json = 0882 Gzip + Msgpack = 0948 LZ4 + Json = 1286 LZ4 + Msgpack = 1208
Original tweet size in JSON 2118 Msgpack = 1692 Gzip + Json = 0904 Gzip + Msgpack = 0960 LZ4 + Json = 1311 LZ4 + Msgpack = 1229
Original tweet size in JSON 1940 Msgpack = 1540 Gzip + Json = 0788 Gzip + Msgpack = 0852 LZ4 + Json = 1162 LZ4 + Msgpack = 1091
Original tweet size in JSON 2102 Msgpack = 1696 Gzip + Json = 0913 Gzip + Msgpack = 0970 LZ4 + Json = 1298 LZ4 + Msgpack = 1220
Original tweet size in JSON 2030 Msgpack = 1637 Gzip + Json = 0857 Gzip + Msgpack = 0910 LZ4 + Json = 1270 LZ4 + Msgpack = 1174
Original tweet size in JSON 2816 Msgpack = 1937 Gzip + Json = 1042 Gzip + Msgpack = 1097 LZ4 + Json = 1590 LZ4 + Msgpack = 1345
Original tweet size in JSON 2015 Msgpack = 1617 Gzip + Json = 0827 Gzip + Msgpack = 0884 LZ4 + Json = 1238 LZ4 + Msgpack = 1152
Original tweet size in JSON 2207 Msgpack = 1656 Gzip + Json = 0898 Gzip + Msgpack = 0965 LZ4 + Json = 1341 LZ4 + Msgpack = 1175
Original tweet size in JSON 1850 Msgpack = 1436 Gzip + Json = 0698 Gzip + Msgpack = 0747 LZ4 + Json = 1037 LZ4 + Msgpack = 0963
Original tweet size in JSON 3451 Msgpack = 2049 Gzip + Json = 1090 Gzip + Msgpack = 1122 LZ4 + Json = 1813 LZ4 + Msgpack = 1458
Original tweet size in JSON 2812 Msgpack = 1876 Gzip + Json = 1108 Gzip + Msgpack = 1158 LZ4 + Json = 1730 LZ4 + Msgpack = 1401
Original tweet size in JSON 2919 Msgpack = 1928 Gzip + Json = 0984 Gzip + Msgpack = 1026 LZ4 + Json = 1557 LZ4 + Msgpack = 1320
Original tweet size in JSON 1904 Msgpack = 1447 Gzip + Json = 0764 Gzip + Msgpack = 0822 LZ4 + Json = 1135 LZ4 + Msgpack = 1032
Original tweet size in JSON 1935 Msgpack = 1530 Gzip + Json = 0779 Gzip + Msgpack = 0834 LZ4 + Json = 1150 LZ4 + Msgpack = 1071
Original tweet size in JSON 1963 Msgpack = 1522 Gzip + Json = 0809 Gzip + Msgpack = 0861 LZ4 + Json = 1195 LZ4 + Msgpack = 1075
Original tweet size in JSON 2215 Msgpack = 1605 Gzip + Json = 0903 Gzip + Msgpack = 0962 LZ4 + Json = 1379 LZ4 + Msgpack = 1181
Original tweet size in JSON 2143 Msgpack = 1687 Gzip + Json = 0930 Gzip + Msgpack = 0987 LZ4 + Json = 1372 LZ4 + Msgpack = 1256
Original tweet size in JSON 1974 Msgpack = 1564 Gzip + Json = 0827 Gzip + Msgpack = 0875 LZ4 + Json = 1227 LZ4 + Msgpack = 1131
Original tweet size in JSON 2095 Msgpack = 1671 Gzip + Json = 0890 Gzip + Msgpack = 0943 LZ4 + Json = 1302 LZ4 + Msgpack = 1213
Original tweet size in JSON 2543 Msgpack = 1713 Gzip + Json = 0957 Gzip + Msgpack = 1005 LZ4 + Json = 1492 LZ4 + Msgpack = 1265
Original tweet size in JSON 2232 Msgpack = 1805 Gzip + Json = 0970 Gzip + Msgpack = 1025 LZ4 + Json = 1417 LZ4 + Msgpack = 1308
Original tweet size in JSON 2429 Msgpack = 1720 Gzip + Json = 0958 Gzip + Msgpack = 1024 LZ4 + Json = 1479 LZ4 + Msgpack = 1257
Original tweet size in JSON 2481 Msgpack = 1735 Gzip + Json = 0997 Gzip + Msgpack = 1061 LZ4 + Json = 1526 LZ4 + Msgpack = 1282
Original tweet size in JSON 2123 Msgpack = 1718 Gzip + Json = 0905 Gzip + Msgpack = 0965 LZ4 + Json = 1325 LZ4 + Msgpack = 1238
Original tweet size in JSON 2446 Msgpack = 1759 Gzip + Json = 0987 Gzip + Msgpack = 1031 LZ4 + Json = 1480 LZ4 + Msgpack = 1289
Original tweet size in JSON 1961 Msgpack = 1555 Gzip + Json = 0814 Gzip + Msgpack = 0867 LZ4 + Json = 1226 LZ4 + Msgpack = 1130
Original tweet size in JSON 2115 Msgpack = 1708 Gzip + Json = 0879 Gzip + Msgpack = 0935 LZ4 + Json = 1285 LZ4 + Msgpack = 1197
Original tweet size in JSON 1987 Msgpack = 1583 Gzip + Json = 0824 Gzip + Msgpack = 0876 LZ4 + Json = 1240 LZ4 + Msgpack = 1141
Original tweet size in JSON 1905 Msgpack = 1498 Gzip + Json = 0779 Gzip + Msgpack = 0831 LZ4 + Json = 1165 LZ4 + Msgpack = 1071
Original tweet size in JSON 2041 Msgpack = 1625 Gzip + Json = 0856 Gzip + Msgpack = 0907 LZ4 + Json = 1240 LZ4 + Msgpack = 1154
Original tweet size in JSON 2326 Msgpack = 1659 Gzip + Json = 0956 Gzip + Msgpack = 1012 LZ4 + Json = 1458 LZ4 + Msgpack = 1229
Original tweet size in JSON 2979 Msgpack = 2026 Gzip + Json = 1103 Gzip + Msgpack = 1168 LZ4 + Json = 1744 LZ4 + Msgpack = 1452
Original tweet size in JSON 2113 Msgpack = 1717 Gzip + Json = 0897 Gzip + Msgpack = 0967 LZ4 + Json = 1318 LZ4 + Msgpack = 1242
Original tweet size in JSON 2172 Msgpack = 1585 Gzip + Json = 0900 Gzip + Msgpack = 0954 LZ4 + Json = 1348 LZ4 + Msgpack = 1165
-----------------------------
JSON 000434409 byte(s)
MsgPack 000333941 byte(s)
GZip+MsgPack 000189057 byte(s)
GZip+JSON 000177976 byte(s)
LZ4+MsgPack 000239656 byte(s)
LZ4+JSON 000264572 byte(s)
from twitter import Twitter
import json
import zlib
import lz4
import msgpack
def compress_gzip(data):
return zlib.compress(data)
def compress_lz4(data):
return lz4.dumps(data)
class CompJSONDB(object):
size = 0
def save(self, dct, compressor):
compressed = compressor(json.dumps(dct))
self.size = self.size + len(compressed)
return len(compressed)
class MsgPackDB(object):
size = 0
def save(self, dct):
l = len(msgpack.packb(dct))
self.size = self.size + l
return l
class CompMsgPackDB(object):
size = 0
def save(self, dct, compressor):
l = len(compressor(msgpack.packb(dct)))
self.size = self.size + l
return l
twitter = Twitter()
msgpackdb = MsgPackDB()
gzMsgpackdb = CompMsgPackDB()
gzJsondb = CompJSONDB()
lzMsgpackdb = CompMsgPackDB()
lzJsondb = CompJSONDB()
total = 0
for i in range(0, 10):
for tweet in twitter.statuses.public_timeline():
total = total + (len(json.dumps(tweet)))
print "Original tweet size in JSON %04d" % (len(json.dumps(tweet))) ,
print "Msgpack = %04d" % (msgpackdb.save(tweet)) ,
print "Gzip + Json = %04d" % (gzJsondb.save(tweet, compress_gzip)) ,
print "Gzip + Msgpack = %04d" % (gzMsgpackdb.save(tweet, compress_gzip)) ,
print "LZ4 + Json = %04d" % (lzJsondb.save(tweet, compress_lz4)) ,
print "LZ4 + Msgpack = %04d" % (lzMsgpackdb.save(tweet, compress_lz4))
print "-----------------------------"
print "JSON %09d byte(s)" % total
print "MsgPack %09d byte(s)" % msgpackdb.size
print "GZip+MsgPack %09d byte(s)" % gzMsgpackdb.size
print "GZip+JSON %09d byte(s)" % gzJsondb.size
print "LZ4+MsgPack %09d byte(s)" % lzMsgpackdb.size
print "LZ4+JSON %09d byte(s)" % lzJsondb.size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.