PHP extension-compression and archive extension-the Bzip2 bzip2 function is used to transparently read and write bzip2(.bz2) compressed files.
This module uses the functions in the» bzip2 library of Julian Seward. This module requires bzip2/libbzip2> = 1.0.x.
PHP Bzip2 support is not enabled by default. To compile PHP, you need the -- with-bz2 [= DIR] configuration option to activate bzip2 support.
The following example opens a temporary file and writes a test string, and then outputs the content in the file:
Example #1 bzip2 small Example
Related functions:
Bzclose-close a bzip2 file
Bzcompress-compress a string into bzip2 encoded data
Bzdecompress-extract bzip2-encoded data
Bzerrno-a bzip2 error code is returned.
Bzerror-returns an array containing the bzip2 error code and the error string.
Bzerrstr-returns a bzip2 error string
Bzflush-force write data in all write buffers
Bzopen-open a bzip2 compressed file
Bzread-bzip2 File Binary securely read
Bzwrite-binary secure writing to bzip2 files