home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1999 October / VPR9910A.BIN / OLS / bz2l003 / bz2l003.lzh / BZ2API.TXT next >
Text File  |  1998-06-02  |  3KB  |  97 lines

  1. ##############################################################
  2.     BZ2LIB Application Interface Specification
  3.         by Yoshioka Tsuneo(QWF00133@niftyserve.or.jp)
  4. ##############################################################
  5.  
  6. --------------------------------------------------------------
  7.     int BZ2GetVersion(void)
  8. --------------------------------------------------------------
  9. Description:
  10.     Return current BZ2LIB version information
  11. Return Value:
  12.     100 times of current version number.
  13. Example:
  14.     Version 0.01 ---> return 1
  15.     Version 1.00 ---> return 100
  16.  
  17. --------------------------------------------------------------
  18.     int BZ2GetRunning(void)
  19. --------------------------------------------------------------
  20. Description:
  21.     Check if BZ2LIB's function is currently running.
  22. Return Value:
  23.     1    yes
  24.     0    no
  25.  
  26. --------------------------------------------------------------
  27.     BZ2FILE* BZ2Open(char *file,char *mode)
  28. --------------------------------------------------------------
  29. Description:
  30.     Open BZ2 format file.You can BZ2Read/BZ2Write API for 
  31.     reading-from/writing-to with uncompressing/compressing.
  32. Parameter:
  33.     file    BZ2 format compressed filename.
  34.     mode    combination string of following value.
  35.           'r'    read with uncompressing mode.
  36.               You can use BZ2Write API.
  37.           'w'    write with compressing mode.
  38.               You can use BZ2Read API.
  39.           '1'..'9'
  40.               Compression level.this is valid when 'w' is used.
  41.  
  42. Return Value:
  43.     Pointer to BZFILE structure.
  44.     NULL when there is an error.
  45.  
  46. --------------------------------------------------------------
  47.     BZ2FILE* BZ2OpenStream(FILE *zStream,char *mode)
  48.     !!!WINDOWNS DLL *CANNOT* USE!!!
  49. --------------------------------------------------------------
  50. Description:
  51.     The same as BZ2Open.But specify FILE * structure
  52.     returned by fopen.
  53.  
  54. ---------------------------------------------------------------
  55.     void BZ2Close(BZ2FILE *BZ2fp)
  56. ---------------------------------------------------------------
  57. Description:
  58.     Close file associated by BZ2fp structure.
  59. Parameter:
  60.     BZ2fp    BZ2FILE structure returned by BZ2OpenFile.
  61.  
  62. --------------------------------------------------------------
  63.     BZ2FILE* BZ2CloseStream(BZ2FILE *BZ2fp)
  64.     !!!WINDOWNS DLL *CANNOT* USE!!!
  65. --------------------------------------------------------------
  66. Description:
  67.     The same as BZ2Close.But specify BZ2fp returned
  68.     by BZ2OpenStream.
  69.  
  70. ---------------------------------------------------------------
  71.     int BZ2Write(BZ2FILE *BZ2fp,char *buff,int size)
  72. ---------------------------------------------------------------
  73. Description:
  74.     Write data to the bzip2 file.
  75. Parameter:
  76.     BZ2fp    BZ2FILE structure returned by BZ2OpenFile
  77.     buff    data buffer to write
  78.     size    data buffer size
  79. Return Value:
  80.     size of written.
  81.     -1     Error.
  82.  
  83. ---------------------------------------------------------------
  84.     int BZ2Read(BZ2FILE *BZ2fp,char *buff,int size)
  85. ---------------------------------------------------------------
  86. Description:
  87.     Read data from the bzip2 file.
  88. Parameter:
  89.     BZ2fp    BZ2FILE structure returned by BZ2OpenFile
  90.     buff    data buffer to read
  91.     size    data buffer size
  92. Return Value:
  93.     size of read.
  94.     -1     Error.
  95.  
  96.  
  97.