C# Class Redu.Util.Ascii85

C# implementation of ASCII85 encoding. Based on C code from http://www.stillhq.com/cgi-bin/cvsweb/ascii85/
Jeff Atwood http://www.codinghorror.com/blog/archives/000410.html
显示文件 Open project: arccoza/redu

Public Properties

Property Type Description
EnforceMarks bool
LineLength int
PrefixMark string
SuffixMark string

Public Methods

Method Description
Decode ( string s ) : byte[]

Decodes an ASCII85 encoded string into the original binary data

Encode ( byte ba ) : string

Encodes binary data into a plaintext ASCII85 format string

Private Methods

Method Description
AppendChar ( StringBuilder sb, char c ) : void
AppendString ( StringBuilder sb, string s ) : void
DecodeBlock ( ) : void
DecodeBlock ( int bytes ) : void
EncodeBlock ( StringBuilder sb ) : void
EncodeBlock ( int count, StringBuilder sb ) : void

Method Details

Decode() public method

Decodes an ASCII85 encoded string into the original binary data
public Decode ( string s ) : byte[]
s string ASCII85 encoded string
return byte[]

Encode() public method

Encodes binary data into a plaintext ASCII85 format string
public Encode ( byte ba ) : string
ba byte binary data to encode
return string

Property Details

EnforceMarks public_oe property

Add the Prefix and Suffix marks when encoding, and enforce their presence for decoding
public bool EnforceMarks
return bool

LineLength public_oe property

Maximum line length for encoded ASCII85 string; set to zero for one unbroken line.
public int LineLength
return int

PrefixMark public_oe property

Prefix mark that identifies an encoded ASCII85 string, traditionally '<~'
public string PrefixMark
return string

SuffixMark public_oe property

Suffix mark that identifies an encoded ASCII85 string, traditionally '~>'
public string SuffixMark
return string