C# Class BusinessCats.Ascii85

Mostra file Open project: adzm/BusinessCats Class Usage Examples

Public Properties

Property Type Description
EnforceMarks bool
LineLength int
PrefixMark string
SuffixMark string

Public Methods

Method Description
Decode ( string data ) : byte[]

simple Decode with default values

DecodeData ( string s ) : byte[]

Decodes an ASCII85 encoded string into the original binary data

Encode ( byte data ) : string

simple Encode with default values

EncodeData ( 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 static method

simple Decode with default values
public static Decode ( string data ) : byte[]
data string
return byte[]

DecodeData() public method

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

Encode() public static method

simple Encode with default values
public static Encode ( byte data ) : string
data byte
return string

EncodeData() public method

Encodes binary data into a plaintext ASCII85 format string
public EncodeData ( 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