Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>charpack()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 CHARPACK()
 Compresses (packs) a string
------------------------------------------------------------------------------
 Syntax

     CHARPACK(<cString>,[<nMethod>]) --> cPackString

 Arguments

     <cString>  Designates the character string that is packed.

     <nMethod>  Designates which pack algorithm is used on the designated
     character string.  The default value is method 0.

 Returns

     CHARPACK() returns the compressed string.

 Description

     This function allows you to compress (pack) the contents of strings.
     The function supports two different pack methods:

     Table 4-2: Pack Methods Supported
     ------------------------------------------------------------------------
     <nMethod>    Pack Algorithm
     ------------------------------------------------------------------------
     0            Modified run length encoding
     1            Bit oriented algorithm
     ------------------------------------------------------------------------

 Note

     Important!  A packed string can contain CHR(0) or other control
     characters.

 Example

     Using the bit pack method, compress a text from a DOS file:

     Var := CHARPACK(FILESTR("C:\TEXT\TEST.TXT"), 1)
     STRFILE(Var, "C:\TEXT\TEST.PAK")      // New save


See Also: CHARUNPACK()

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