Unit bzip2_main

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

*******************************************************

Overview

Classes, Interfaces, Objects and Records

Name Description
packed record TBZStreamRec Internal structure.
Class TCustomBZip2Stream Abstract ancestor class
Class TBZCompressionStream  
Class TBZDecompressionStream TDecompressionStream decompresses data on the fly as data is read from it.
Class EBZip2Error  
Class EBZCompressionError  
Class EBZDecompressionError  

Functions and Procedures

procedure BZCompressBuf(const InBuf: Pointer; InBytes: Integer; out OutBuf: Pointer; out OutBytes: Integer);
procedure BZDecompressBuf(const InBuf: Pointer; InBytes: Integer; OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer);

Types

TAlloc = function(opaque: Pointer; Items, Size: Integer): Pointer; cdecl;
TFree = procedure(opaque, Block: Pointer); cdecl;
TBlockSize100k = (...);

Description

Functions and Procedures

procedure BZCompressBuf(const InBuf: Pointer; InBytes: Integer; out OutBuf: Pointer; out OutBytes: Integer);

CompressBuf compresses data, buffer to buffer, in one call. In: InBuf = ptr to compressed data InBytes = number of bytes in InBuf Out: OutBuf = ptr to newly allocated buffer containing decompressed data OutBytes = number of bytes in OutBuf

procedure BZDecompressBuf(const InBuf: Pointer; InBytes: Integer; OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer);

DecompressBuf decompresses data, buffer to buffer, in one call. In: InBuf = ptr to compressed data InBytes = number of bytes in InBuf OutEstimate = zero, or est. size of the decompressed data Out: OutBuf = ptr to newly allocated buffer containing decompressed data OutBytes = number of bytes in OutBuf

Types

TAlloc = function(opaque: Pointer; Items, Size: Integer): Pointer; cdecl;
 
TFree = procedure(opaque, Block: Pointer); cdecl;
 
TBlockSize100k = (...);

TBZCompressionStream compresses data on the fly as data is written to it, and stores the compressed data to another stream.

TBZCompressionStream is write-only and strictly sequential. Reading from the stream will raise an exception. Using Seek to move the stream pointer will raise an exception.

Output data is cached internally, written to the output stream only when the internal output buffer is full. All pending output data is flushed when the stream is destroyed.

The Position property returns the number of uncompressed bytes of data that have been written to the stream so far.

CompressionRate returns the on-the-fly percentage by which the original data has been compressed: (1 - (CompressedBytes / UncompressedBytes)) * 100 If raw data size = 100 and compressed data size = 25, the CompressionRate is 75%

The OnProgress event is called each time the output buffer is filled and written to the output stream. This is useful for updating a progress indicator when you are writing a large chunk of data to the compression stream in a single call.

Values
  • bs1:  
  • bs2:  
  • bs3:  
  • bs4:  
  • bs5:  
  • bs6:  
  • bs7:  
  • bs8:  
  • bs9:  

Generated by PasDoc 0.13.0 on 2016-01-23 23:27:22