Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SIx Driver RDD v3.00 - Reference Guide - <b>sx_decompress():</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Sx_Decompress():

  Syntax:   Sx_Decompress( <cString> )

            cString = String of compressed data to be decompressed.

  Returns:  A string containing the data decompressed from cString.  If the
            value passed to Sx_Decompress() is not a character string, that
            same value (unchanged) is returned.

  Description:  Sx_Decompress() and its related function Sx_Compress()
                provide an easy way to create and restore compressed
                data.  Any valid string data can be handled by these
                functions.  Memory requirements are very minimal, Only
                9k plus the size of the string is required to compress
                and decompress the data.

                The compression method utilized is a modified LZSS
                algorithm.  This algorithm provides for a good balance
                of speed and compression.

                This function is the decompression engine that is
                used in Sx_File2BLOB() and Sx_BLOB2File().

  Example:

    // Assuming all text in the .FPT memo field was previously compressed
    // using Sx_Compress(), this decompresses the text for viewing

    LOCAL cTemp := "", nMaxRow := MaxRow(), nMaxCol := MaxCol()

    USE test VIA "SIXCDX"   // Open TEST.DBF and TEST.FPT
    dbGoTop()               // Make sure we're at the top

    cTemp := Sx_Decompress( test->NOTES )  // Decompress text in NOTES field

    @ 0, 0 TO nMaxRow, nMaxCol                          // Make a box
    MemoEdit( cTemp, 1, 1, nMaxRow-1, nMaxCol-1, .F. )  // View the memo


See Also: Sx_Compress() Sx_FDecompress() Sx_FCompress()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson