The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information.... |
Home BasePack DStruct Procedures and Functions EncodeASCII85 | |||||||||
See also: DecodeASCII85, ASCII Code, EncodeBase64 | |||||||||
EncodeASCII85 |
|||||||||
The procedure EncodeASCII85 encodes the data of the stream InStream into a base-85 encoded data stream OutStream. Base-85 encoded data is primarily used in PDF and PostScript files. The encoding process starts at the current position of the input stream InStream and writes the resulting data to the current position of Outstream (overwriting all data after the current position). The parameter InsertCRLF controls whether the output stream is structured by <CR> (ASCII 13) and <LF> (ASCII 10) characters. If InsertCRLF is TRUE the encoded data stream is written as lines of 60 characters each. Following is a detailed description of ASCII85 encoding [1]: ASCII base-85 encoding produces five ASCII printing characters from every four bytes of binary data. Each group of four binary bytes (b1 b2 b3 b4) is converted to a group of five encoded characters (c1 c2 c3 c4 c5) using the relation
b1*2563 + b2*2562 + b3*2561 + b4 =
[1] Adobe Systems Inc.: "Portable Document Format Reference Manual", Version 1.3, March 1999
|