-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChanges
More file actions
223 lines (138 loc) · 7.45 KB
/
Changes
File metadata and controls
223 lines (138 loc) · 7.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
Revision history for Compression-Util
0.16 2026-03-31
[IMPROVEMENTS]
- Better performance in `bwt_sort()` for certain inputs. (~2x faster)
- Better performance in `bwt_decode()`, `huffman_decode()` and `huffman_from_freq()`.
- Better performance in `lzss_decode()`.
0.15 2025-04-03
[BUG-FIXES]
- Set the appropriate DEFLATE values inside the `deflate_*` functions.
0.14 2024-11-06
[ADDITIONS]
- Added the `adler32()` checksum function.
- Added the `zlib_compress()` and `zlib_uncompress()` functions.
- Added the following low-level functions:
deflate_create_block_type_0_header
deflate_create_block_type_1
deflate_create_block_type_2
deflate_extract_next_block
deflate_extract_block_type_0
deflate_extract_block_type_1
deflate_extract_block_type_2
0.13 2024-08-25
[IMPROVEMENTS]
- More Gzip flags are now recognized.
- Better compression ratio in bzip2_compress().
[BUG-FIXES]
- Fixed the extraction of Gzip data that contains a comment.
- Fixed a potential CRC32 issue in bzip2_compress() when data gets expanded.
0.12 2024-08-23
[ADDITIONS]
- Added the `lz4_compress()` and `lz4_decompress()` functions.
[IMPROVEMENTS]
- Slightly better performance in `mtf_encode()`.
- Replaced all "die" statements, with Carp::confess(), for better debugging.
[BUG-FIXES]
- Allow `$LZ77_MIN_LEN` to be set by the user to a value greater than 4, before calling `gzip_compress()`.
0.11 2024-08-22
[ADDITIONS]
- Added the `crc32()` function.
- Added the `int2bytes()` and `int2bytes_lsb()` functions.
- Added the `bzip2_compress()` and `bzip2_decompress()` functions.
- Added the `gzip_compress()` and `gzip_decompress()` functions.
- Added the `encode_alphabet_256()` and `decode_alphabet_256()` functions.
[IMPROVEMENTS]
- Minor documentation improvements.
- Slightly more efficient encoding of the alphabet, in function `encode_alphabet()`.
[CHANGES]
- Changed the default value of `$Compression::Util::LZ_MAX_LEN` from 258 to 32768. For some inputs, this results in better compression at no additional costs.
0.10 2024-08-07
[ADDITIONS]
- Added the `mrl_compress()` and `mrl_decompress()` functions, for compressing/decompressing strings.
- Added the `bytes2int()` and `bytes2int_lsb()` functions.
[CHANGES]
- Changed the order of values returned by `lz77_encode()`.
- Changed the order of arguments accepted by `lz77_decode()`.
[FIXES]
- Fixed an issue in `lzb_decompress($fh)`, when there is more data after the LZB block.
0.09 2024-06-26
- Generalized `make_deflate_tables()` to generate tables for arbitrarily large distances and match lengths.
- Generalized `deflate_encode()` to encode arbitrarily large distances and arbitrarily large match lengths.
- Better compression ratio when `$LZ_MAX_DIST` is set to a small value.
- Minor documentation and performance improvements.
0.08 2024-06-03
[ADDITIONS]
- Added the `lzb_compress()` and `lzb_decompress()` functions.
- Added the `lzss_encode_symbolic()` and `lzss_decode_symbolic()` functions.
- Added the `lzss_compress_symbolic()` and `lzss_decompress_symbolic()` functions.
- Added the `$LZ_MAX_DIST` variable, which controls the maximum backreference allowed in LZ parsing.
[IMPROVEMENTS]
- Better compression ratio in `lz77_compress()`.
[CHANGES]
- Renamed `bz2_compress` and `bz2_decompress` to `bwt_compress` and `bwt_decompress`, respectively.
- Renamed `$LZSS_MIN_LEN` to `$LZ_MIN_LEN`.
- Renamed `$LZSS_MAX_LEN` to `$LZ_MAX_LEN`.
- Removed the `$LZ77_MIN_LEN` and `$LZ77_MAX_LEN` variables. Using `$LZ_MIN_LEN` and `$LZ_MAX_LEN` instead.
0.07 2024-05-12
- Use the value of `$LZ_MAX_CHAIN_LEN` in `lz77_encode_symbolic()` as well.
- Added the following package variables:
$Compression::Util::LZSS_MIN_LEN
$Compression::Util::LZSS_MAX_LEN
$Compression::Util::LZ77_MIN_LEN
$Compression::Util::LZ77_MAX_LEN
...which control the minimum and maximum lenght of a match in LZSS/lZ77 encoding.
- Added support for exporting package variables with `use Compression::Util qw($PACKAGE_VARIABLE)`.
0.06 2024-05-05
[ADDITIONS]
- Added the lzss_encode_fast() function.
- Added the lz77_compress_symbolic() and lz77_decompress_symbolic() functions.
[IMPROVEMENTS]
- Much faster algorithm in lzss_encode() for large enough strings.
- Much better compression ratios achived by lzss_encode().
- Extended lzss_compress() to accept an additional optional argument, specifying the LZSS encoding method.
[CHANGES]
- Removed the lzhd_compress() and lzhd_decompress() functions.
- Renamed the mrl_compress() and mrl_decompress() to mrl_compress_symbolic() and mrl_decompress_symbolic(), respectively.
- Simplified all functions to no longer take an optional output filehandle.
[BUG-FIXES]
- The output of delta_encode() is now always deterministic.
0.05 2024-04-13
[ADDITIONS]
- Added the mrl_compress() and mrl_decompress() functions.
- Added the read_bit_lsb(), read_bits_lsb(), int2bits(), int2bits_lsb(), bits2int() and bits2int_lsb() functions.
- Added the read_null_terminated() function.
- Added the string2symbols() and symbols2string() functions.
[IMPROVEMENTS]
- Extended `huffman_from_*` to check the context and return only the encoding dictionary in scalar context.
[CHANGES]
- Simplified `lzss_encode()` for better performance, with a minimal impact on compression ratio.
[BUG-FIXES]
- Fixed several special cases and added more tests.
0.04 2024-04-06
[ADDITIONS]
- Added the deltas() and its inverse, accumulate(), functions.
- Added the frequencies() function.
- Added the huffman_from_symbols() function.
- Added the huffman_from_code_lengths() function.
[CHANGES]
- Simplified deflate_encode() to always return a binary string (no longer writes to a file-handle).
- Improved the delta_encode() function to also use RLE when it's beneficial.
- Renamed huffman_tree_from_freq() to huffman_from_freq().
0.03 2024-03-22
[ADDITIONS]
- Added the lzhd_compress() and lzhd_decompress() functions.
- Added the obh_encode() and obh_decode() functions.
[CHANGES]
- Simplified deflate_encode() to no longer require the size of the uncompressed data.
0.02 2024-03-21
[ADDITIONS]
- Added the run_length() function.
- Added the binary_vrl_encode() and binary_vrl_decode() functions.
- Added the elias_gamma_encode() and elias_gamma_decode() functions.
- Added the adaptive_ac_encode() and adaptive_ac_decode() functions.
- Added the create_adaptive_ac_entry() and decode_adaptive_ac_entry() functions.
[CHANGES]
- Renamed mtf_encode_alphabet() to encode_alphabet().
- Renamed mtf_decode_alphabet() to decode_alphabet().
0.01 2024-03-21
- Initial release.