@@ -11,6 +11,80 @@ bundle exec ruby decompress.rb city.json
1111
1212
1313# Result
14+ ## 2024/03/29
15+
16+ ```
17+ % system_profiler SPHardwareDataType
18+ Hardware:
19+
20+ Hardware Overview:
21+
22+ Model Name: MacBook Pro
23+ Model Identifier: Mac14,7
24+ Chip: Apple M2
25+ Total Number of Cores: 8 (4 performance and 4 efficiency)
26+ Memory: 24 GB
27+ System Firmware Version: 8422.100.650
28+ OS Loader Version: 7459.141.1
29+ Serial Number (system): V90G2M34LL
30+ Hardware UUID: C9914E86-7CF2-5927-92F9-EE062FB87913
31+ Provisioning UDID: 00008112-000205A22E31401E
32+ Activation Lock Status: Disabled
33+ ```
34+ ### Compression
35+ ```
36+ % bundle exec ruby compress.rb city.json
37+ ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin21]
38+ Warming up --------------------------------------
39+ snappy 12.000 i/100ms
40+ gzip 5.000 i/100ms
41+ xz 1.000 i/100ms
42+ lz4 43.000 i/100ms
43+ zstd 34.000 i/100ms
44+ Calculating -------------------------------------
45+ snappy 124.315 (± 3.2%) i/s - 624.000 in 5.024270s
46+ gzip 51.185 (± 5.9%) i/s - 255.000 in 5.000801s
47+ xz 3.358 (± 0.0%) i/s - 17.000 in 5.074521s
48+ lz4 443.950 (± 4.1%) i/s - 2.236k in 5.045395s
49+ zstd 352.064 (± 6.5%) i/s - 1.768k in 5.044874s
50+
51+ ```
52+ #### Data Size
53+ ##### before
54+ ```
55+ % ls -alh samples/city.json
56+ -rw-r--r-- 1 springmt staff 1.7M 9 3 2022 samples/city.json
57+ ```
58+ ##### after
59+ ```
60+ % ls -alh results
61+ total 2816
62+ drwxr-xr-x 7 springmt staff 224B 4 9 2023 .
63+ drwxr-xr-x 13 springmt staff 416B 4 9 2023 ..
64+ -rw-r--r-- 1 springmt staff 219K 3 29 14:46 city.json.gzip
65+ -rw-r--r-- 1 springmt staff 384K 3 29 14:46 city.json.lz4
66+ -rw-r--r-- 1 springmt staff 358K 3 29 14:46 city.json.snappy
67+ -rw-r--r-- 1 springmt staff 166K 3 29 14:46 city.json.xz
68+ -rw-r--r-- 1 springmt staff 225K 3 29 14:46 city.json.zstd
69+ ```
70+ ### Decompression
71+ ```
72+ % bundle exec ruby decompress.rb city.json
73+ ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin21]
74+ Warming up --------------------------------------
75+ snappy 45.000 i/100ms
76+ gzip 44.000 i/100ms
77+ xz 7.000 i/100ms
78+ lz4 121.000 i/100ms
79+ zstd 95.000 i/100ms
80+ Calculating -------------------------------------
81+ snappy 454.245 (± 3.1%) i/s - 2.295k in 5.057263s
82+ gzip 440.680 (± 3.4%) i/s - 2.244k in 5.098470s
83+ xz 77.378 (± 2.6%) i/s - 392.000 in 5.070707s
84+ lz4 1.224k (± 5.1%) i/s - 6.171k in 5.056241s
85+ zstd 932.464 (± 3.2%) i/s - 4.750k in 5.099694s
86+ ```
87+
1488## 2022/06/20
1589https://github.com/SpringMT/zstd-ruby/commit/77a9e704747ad24761bcc8194884270f983538c1
1690```
0 commit comments