Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- dBsee 4.6 - The Library - <b>dfrldecmp()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
dfRLDeCmp()
Make an RLE DeCompression
------------------------------------------------------------------------------
Syntax:

     dfRLDeCmp( <cBuffer> ) --> cBufferRet

Parameters:

     <cBuffer>  Buffer to decompres

Returns:

     <cBufferRet>  Buffer decompres <16kb

Description:

     This function is usefull to decompres some TXT buffer
     
     N.B. NEVER use buffer not compressed for an incorrect decompression
     
     N.B. NEVER use buffer>16kb

Example:

     * ######################
     FUNCTION Main( cBuffer )
     * ######################
     LOCAL cBufferRead, cBufferCmp
     
     cBufferRead := MEMOREAD( cBuffer )
     IF LEN(cBufferRead)<16000
        cBufferCmp  := dfRLCmp( cBufferRead )
     
        IF LEN(cBufferCmp) < LEN(cBufferRead)
           ? "OK"
           IF LEN(dfRLDeCmp(cBufferCmp))==LEN(cBufferRead)
              ? "OK"
           ELSE
              ? "Error"
           ENDIF
        ELSE
           ? "Compression impossible"
        ENDIF
     ENDIF
     
     RETURN NIL

See also:

     dfRLCmp()

See Also: dfRLCmp()

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