@@ -33,6 +33,12 @@ RPM packages of this extension are available in [» Remi's RPM repository](https
3333
3434DEB packages of this extension are available in [ » Ondřej Surý's DEB repository] ( https://deb.sury.org/ ) and are named ** php-lz4** .
3535
36+ ## Installation via PIE
37+
38+ ``` bash
39+ pie install kjdev/lz4
40+ ```
41+
3642
3743## Configuration
3844
@@ -42,8 +48,10 @@ php.ini:
4248
4349## Function
4450
45- * lz4\_ compress — LZ4 compression
46- * lz4\_ uncompress — LZ4 decompression
51+ * lz4\_ compress — LZ4 compression (block format)
52+ * lz4\_ uncompress — LZ4 decompression (block format)
53+ * lz4\_ compress\_ frame — LZ4 compression (frame format)
54+ * lz4\_ uncompress\_ frame — LZ4 decompression (frame format)
4755
4856### lz4\_ compress — LZ4 compression
4957
@@ -99,6 +107,70 @@ LZ4 decompression.
99107
100108Returns the decompressed data or FALSE if an error occurred.
101109
110+
111+ ### lz4\_ compress\_ frame — LZ4 compression (frame format)
112+
113+ #### Description
114+
115+ string ** lz4\_ compress\_ frame** ( string _ $data_ [ , int _ $level_ = 0 , int _ $max_block_size_ = 0 , int _ $checksums_ = 0 ] )
116+
117+ LZ4 compression to frame.
118+
119+ #### Pameters
120+
121+ * _ data_
122+
123+ The string to compress.
124+
125+ * _ level_
126+
127+ The level of compression (1-12, Recommended values are between 4 and 9).
128+ (Default to 0, Not High Compression Mode.)
129+
130+ * _ max\_ block\_ size_
131+
132+ Maximum uncompressed size of each block.
133+ Pass any of the following values:
134+
135+ * _ LZ4\_ BLOCK\_ SIZE\_ 64KB_
136+ * _ LZ4\_ BLOCK\_ SIZE\_ 256KB_
137+ * _ LZ4\_ BLOCK\_ SIZE\_ 1MB_
138+ * _ LZ4\_ BLOCK\_ SIZE\_ 4MB_
139+
140+ Any other value will be treated as _ LZ4\_ BLOCK\_ SIZE\_ 64KB_ .
141+
142+ * _ checksums_
143+
144+ Enable/disable frame level and block level checksums.
145+ Pass a bitwise combination of the following constants:
146+
147+ * _ LZ4\_ CHECKSUM\_ FRAME_ : frame level checksum
148+ * _ LZ4\_ CHECKSUM\_ BLOCK_ : block level checksum
149+
150+ #### Return Values
151+
152+ Returns the compressed data or FALSE if an error occurred.
153+
154+
155+ ### lz4\_ uncompress\_ frame — LZ4 decompression (frame format)
156+
157+ #### Description
158+
159+ string ** lz4\_ uncompress\_ frame** ( string _ $data_ )
160+
161+ LZ4 decompression from frame.
162+
163+ #### Pameters
164+
165+ * _ data_
166+
167+ The compressed string.
168+
169+ #### Return Values
170+
171+ Returns the decompressed data or FALSE if an error occurred.
172+
173+
102174## Examples
103175
104176 $data = lz4_compress('test');
0 commit comments