<-- Previous || Up || Next -->

Run Length Decode Printable Function
Co Decs Class

Public Function RunLengthDecodePrintable( _
    ByVal vValue As Variant _
    ) As Variant

Decode a string which was encoded with RunLengthEncodePrintable.
This function is mainly used to decompress Visual Basic Global/Public Constant strings which are to contain "non-printable" characters (or those characters which Microsoft recommends should not appear within Visual Basic nor VBA Modules).

    RunLengthDecodePrintable("One}-}*})Two") = "One" + vbCrLf + Chr$(9) + "Two"
    RunLengthDecodePrintable("This is a test.") = "This is a test."
See also:
    RunLengthEncodePrintable Function
    RunLengthDecode Function
Algorithm: Characters with the ASCII value on the left were replaced by the string on the right.
    0..31:    Chr$(125) + Chr$(N + 32)
    32..123:  Chr$(N)
    124..183: Chr$(125) + Chr$(N - 60)
    183..255: Chr$(126) + Chr$(N - 151)
vValue: The string created by the RunLengthEncodePrintable function which is to be decoded. Function returns Null if vValue is Null or cannot be fixed up to a String.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.