EldoS
 Table of Contents >  OnDataCompress event/delegate/callback
Navigation
Web site
Support
Table Of Contents
Send comments on this topic

OnDataCompress event/delegate/callback

Filter:

Pascal    DLL    C++ (DLL/Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET   

SolFSStorage     See also    

Overview

This event is fired when custom compression is used and data block must be compressed.

Declaration

[Pascal]
    TSolFSCompressDataEvent = procedure( Sender : TObject; InData : Pointer; InSize : LongWord; OutData : Pointer; var OutSize : LongWord; CompressionLevel : LongWord; var Result : LongInt) of object;

[DLL]
    typedef Error (__stdcall *SolFSCompressDataFunc)( LongWord UserData, void * InData, unsigned long InSize, void * OutData, unsigned long * OutSize, unsigned long CompressionLevel);

[C++ (DLL/Lib)]
    typedef Error (__stdcall *SolFSCompressDataFunc)( LongWord UserData, void * InData, unsigned long InSize, void * OutData, unsigned long * OutSize, unsigned long CompressionLevel);

[C++ (VCL)]
    typedef void (__closure *TSolFSCompressDataEvent)( System::TObject* Sender, void * InData, unsigned long InSize, void * OutData, unsigned long OutSize, unsigned long CompressionLevel, unsigned long & Result);

[C++ (.NET)]
    public __delegate void SolFSCompressDataEvent( SolFSStorage* Sender, unsigned char inData __gc[], unsigned char outData __gc[], Int32 __gc &outSize, unsigned long CompressionLevel, Int32 __gc &result);

[C#]
    public void SolFSCompressDataEvent( SolFS.SolFSStorage Sender, uchar[] inData, uchar[] outData, ref int outSize, unsigned long CompressionLevel, ref int result);

[VB.NET]
    Sub SolFSCompressDataEvent( ByVal Sender As SolFS.SolFSStorage, ByVal inData As Byte(), ByVal outData As Byte(), ByRef outSize As Int32, ByVal CompressionLevel As UInt32, ByRef Result As Int32)

Parameters

  • Sender - reference to the class that called the delegate/event handler
  • InData - buffer with data to be compressed
  • InSize - length of the incoming buffer
  • OutData - the buffer for compressed data
  • OutSize - actual size of compressed data (see description)
  • CompressionLevel - compression level
  • Result - out parameter (return value for DLL) where the application places the result of the operation. If you are working with file system, Win32 error code is a good candidate for placing to Result parameter. Otherwise you can use any other error codes, just be sure that 0 means success.
  • [DLL] UserData - application-defined parameter which is specified when creating the storage and passed back to callback function.

Description

The event is fired when custom compression is used and the data block must be compressed. Data to compress is put to InData parameter. The size of the incoming data is placed to InSize. The event handler should put the result of compression to the buffer referenced by OutData parameter. OutSize should be set to the number of bytes, put to OutData parameter.

See also

Information about callbacks (Driver Edition only)     OnDataDecompress    

Contact Us | Subscribe | Terms of Use | Trademarks | Privacy Statement
Copyright (c) 1998-2008, EldoS Corporation