Base85 encoder class. Partially based on: https://github.com/coding-horror/ascii85/tree/master.
More...
|
static byte[] | FromBase85String (string base85string, bool useMarks=false) |
| Converts a Base85-string to a byte-array.
|
|
static string | ToBase85String (byte[] bytes, bool useMarks=false) |
| Converts a byte-array to a Base85-string.
|
|
static string | ToBase85String (string str, Encoding? encoding=null, bool useMarks=false) |
| Converts the value of a string to a Base85-string.
|
|
static string | Base85FromFile (string file, bool useMarks=false) |
| Converts a file to a Base85-string.
|
|
static async Task< string > | Base85FromFileAsync (string file, bool useMarks=false) |
| Converts a file to a Base85-string asynchronously.
|
|
static bool | FileFromBase85 (string file, string base85string, bool useMarks=false) |
| Converts a Base85-string to a file.
|
|
static async Task< bool > | FileFromBase85Async (string file, string base85string, bool useMarks=false) |
| Converts a Base85-string to a file asynchronously.
|
|
|
static string | PrefixMark = "<~" |
| Prefix mark that identifies an encoded Base85-string (default: <~).
|
|
static string | SuffixMark = "~>" |
| Suffix mark that identifies an encoded Base85-string (default: ~>).
|
|
◆ Base85FromFile()
static string BogaNet.Encoder.Base85.Base85FromFile |
( |
string | file, |
|
|
bool | useMarks = false ) |
|
static |
Converts a file to a Base85-string.
- Parameters
-
file | File to convert |
useMarks | Add the Prefix and Suffix marks when encoding, and enforce their presence for decoding (default: false). |
- Returns
- File content as converted Base85-string
- Exceptions
-
◆ Base85FromFileAsync()
static async Task< string > BogaNet.Encoder.Base85.Base85FromFileAsync |
( |
string | file, |
|
|
bool | useMarks = false ) |
|
static |
Converts a file to a Base85-string asynchronously.
- Parameters
-
file | File to convert |
useMarks | Add the Prefix and Suffix marks when encoding, and enforce their presence for decoding (default: false). |
- Returns
- File content as converted Base85-string
- Exceptions
-
◆ FileFromBase85()
static bool BogaNet.Encoder.Base85.FileFromBase85 |
( |
string | file, |
|
|
string | base85string, |
|
|
bool | useMarks = false ) |
|
static |
Converts a Base85-string to a file.
- Parameters
-
file | File to write the content of the Base85-string |
base85string | Data as Base85-string |
useMarks | Add the Prefix and Suffix marks when encoding, and enforce their presence for decoding (default: false). |
- Returns
- True if the operation was successful
- Exceptions
-
◆ FileFromBase85Async()
static async Task< bool > BogaNet.Encoder.Base85.FileFromBase85Async |
( |
string | file, |
|
|
string | base85string, |
|
|
bool | useMarks = false ) |
|
static |
Converts a Base85-string to a file asynchronously.
- Parameters
-
file | File to write the content of the Base85-string |
base85string | Data as Base85-string |
useMarks | Add the Prefix and Suffix marks when encoding, and enforce their presence for decoding (default: false). |
- Returns
- True if the operation was successful
- Exceptions
-
◆ FromBase85String()
static byte[] BogaNet.Encoder.Base85.FromBase85String |
( |
string | base85string, |
|
|
bool | useMarks = false ) |
|
static |
Converts a Base85-string to a byte-array.
- Parameters
-
base85string | Data as Base85-string |
useMarks | Add the Prefix and Suffix marks when encoding, and enforce their presence for decoding (default: false). |
- Returns
- Data as byte-array
- Exceptions
-
◆ ToBase85String() [1/2]
static string BogaNet.Encoder.Base85.ToBase85String |
( |
byte[] | bytes, |
|
|
bool | useMarks = false ) |
|
static |
Converts a byte-array to a Base85-string.
- Parameters
-
bytes | Data as byte-array |
useMarks | Add the Prefix and Suffix marks when encoding, and enforce their presence for decoding (default: false). |
- Returns
- Data as encoded Base85-string
- Exceptions
-
◆ ToBase85String() [2/2]
static string BogaNet.Encoder.Base85.ToBase85String |
( |
string | str, |
|
|
Encoding? | encoding = null, |
|
|
bool | useMarks = false ) |
|
static |
Converts the value of a string to a Base85-string.
- Parameters
-
str | Input string |
encoding | Encoding of the string (optional, default: UTF8) |
useMarks | Add the Prefix and Suffix marks when encoding, and enforce their presence for decoding (default: false). |
- Returns
- String value as converted Base85-string
- Exceptions
-
◆ PrefixMark
string BogaNet.Encoder.Base85.PrefixMark = "<~" |
|
static |
Prefix mark that identifies an encoded Base85-string (default: <~).
◆ SuffixMark
string BogaNet.Encoder.Base85.SuffixMark = "~>" |
|
static |
Suffix mark that identifies an encoded Base85-string (default: ~>).
The documentation for this class was generated from the following file:
- /Users/stefanlaubenberger/Projects/CSharp/BogaNet/BogaNet.Encoder/Encoder/Base85.cs