############################################################## BZ2LIB Application Interface Specification by Yoshioka Tsuneo(QWF00133@niftyserve.or.jp) ############################################################## -------------------------------------------------------------- int BZ2GetVersion(void) -------------------------------------------------------------- Description: Return current BZ2LIB version information Return Value: 100 times of current version number. Example: Version 0.01 ---> return 1 Version 1.00 ---> return 100 -------------------------------------------------------------- int BZ2GetRunning(void) -------------------------------------------------------------- Description: Check if BZ2LIB's function is currently running. Return Value: 1 yes 0 no -------------------------------------------------------------- BZ2FILE* BZ2Open(char *file,char *mode) -------------------------------------------------------------- Description: Open BZ2 format file.You can BZ2Read/BZ2Write API for reading-from/writing-to with uncompressing/compressing. Parameter: file BZ2 format compressed filename. mode combination string of following value. 'r' read with uncompressing mode. You can use BZ2Write API. 'w' write with compressing mode. You can use BZ2Read API. '1'..'9' Compression level.this is valid when 'w' is used. Return Value: Pointer to BZFILE structure. NULL when there is an error. -------------------------------------------------------------- BZ2FILE* BZ2OpenStream(FILE *zStream,char *mode) !!!WINDOWNS DLL *CANNOT* USE!!! -------------------------------------------------------------- Description: The same as BZ2Open.But specify FILE * structure returned by fopen. --------------------------------------------------------------- void BZ2Close(BZ2FILE *BZ2fp) --------------------------------------------------------------- Description: Close file associated by BZ2fp structure. Parameter: BZ2fp BZ2FILE structure returned by BZ2OpenFile. -------------------------------------------------------------- BZ2FILE* BZ2CloseStream(BZ2FILE *BZ2fp) !!!WINDOWNS DLL *CANNOT* USE!!! -------------------------------------------------------------- Description: The same as BZ2Close.But specify BZ2fp returned by BZ2OpenStream. --------------------------------------------------------------- int BZ2Write(BZ2FILE *BZ2fp,char *buff,int size) --------------------------------------------------------------- Description: Write data to the bzip2 file. Parameter: BZ2fp BZ2FILE structure returned by BZ2OpenFile buff data buffer to write size data buffer size Return Value: size of written. -1 Error. --------------------------------------------------------------- int BZ2Read(BZ2FILE *BZ2fp,char *buff,int size) --------------------------------------------------------------- Description: Read data from the bzip2 file. Parameter: BZ2fp BZ2FILE structure returned by BZ2OpenFile buff data buffer to read size data buffer size Return Value: size of read. -1 Error.