PHP compression and archiving-Bzip2

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.