F.4. BZip2

FunctionReturnsDescription
bzopen(string|int file|fp, string mode)
resourceOpens a new BZip2 stream.
bzread(int bz[, int length])
stringReads up to length bytes from a BZip2 stream, or 1024 bytes if length is not specified.
bzwrite(int bz, string data[, int length])
intWrites the contents of the string data to the BZip2 stream.
bzerrno(resource bz)
intReturns the error number.
bzerrstr(resource bz)
stringReturns the error string.
bzerror(resource bz)
arrayReturns the error number and error string in an associative array.
bzcompress(string source [, int blocksize100k [, int workfactor]])
stringCompresses a string into BZip2 encoded data.
bzdecompress(string source [, int small])
stringDecompresses BZip2 compressed data.
bzclose((resource bz)
intCloses a bzip2 file pointer.
bzflush(resource bz)
IntForces a write of all buffered BZip2 data.

Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.