CT_CHARPACK

 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()

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.