Discuss this help topic in SecureBlackbox Forum

TElMessageCompressor.Compress

TElMessageCompressor     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


Compresses a chunk of data.

Declaration

[C#]
    int Compress(byte[] InBuffer, ref byte[] OutBuffer, ref int OutSize);
    int Compress(byte[] InBuffer, int InStartIndex, int InSize, byte[] OutBuffer, int OutStartIndex, ref int OutSize);
    int Compress(System.IO.Stream InStream, System.IO.Stream OutStream, long InCount);

[VB.NET]
    Function Compress(ByVal InBuffer As Byte(), ByRef OutBuffer As Byte(), ByRef OutSize As Integer) As Integer
    Function Compress(ByVal InBuffer As Byte(), ByVal InStartIndex As Integer, ByVal InSize As Integer, ByVal OutBuffer As Byte(), ByVal OutStartIndex As Integer, ByRef OutSize As Integer) As Integer
    Function Compress(ByVal InStream As System.IO.Stream, ByVal OutStream As System.IO.Stream, ByVal InCount As Long) As Integer

[Pascal]
    function Compress(InBuffer : pointer; InSize : integer; OutBuffer : pointer; var OutSize : integer) : integer;
    function Compress(InStream, OutStream : TStream; InCount : Int64 = 0): integer;

[C++]
    int32_t Compress(void * InBuffer, int32_t InSize, void * OutBuffer, int32_t &OutSize);
    int32_t Compress(TStream &InStream, TStream &OutStream, int64_t InCount);
    int32_t Compress(TStream *InStream, TStream *OutStream, int64_t InCount);

[PHP]
    integer Compress(TSBPointer|array of byte|string|NULL $InBuffer, integer $InSize, TSBPointer|array of byte|string|NULL $OutBuffer, integer &$OutSize)
    integer Compress(TStream $InStream, TStream $OutStream, integer $InCount)

[Java]
    int compress(TElStream InStream, TElStream OutStream, long InCount);
    int compress(byte[] InBuffer, int InStartIndex, int InSize, byte[] OutBuffer, int OutStartIndex, TSBInteger OutSize);
    int compress(byte[] InBuffer, byte[] OutBuffer, TSBInteger OutSize);

Parameters

  • InBuffer - buffer containing data to be compressed.
  • InSize - the size of the data to be compressed in bytes.
  • OutBuffer - buffer where the compressed data will be put.
  • OutSize - the size of the compressed data.
  • InStream - stream containing data to be compressed.
  • OutStream - stream where the compressed data will be stored.
  • InCount - number of bytes to be read from InStream.
  • InStartIndex - position in InStream from which to start reading data.
  • OutStartIndex - position in OutStream from which to start saving the compressed data.

Return value

    0 if compression was successful, and an error code otherwise.

Possible values:

Description

    Call this method to compress a piece of data and generate a CompressedData PKCS#7 structure.

See also:     CompressionLevel    

Discuss this help topic in SecureBlackbox Forum