62
edits
Changes
→Class: Converter: => Transcoder
: encodingCheckerFunction takes the encoding name as a parameter and returns true-ish if the encoding should be listed. Regexes should also be supported. If the parameter is missing, returns all supported encodings.
=== Class: Converter Transcoder ===
There also should be a class enc.Converter Transcoder for more advanced general transcoding conversion (transcodingbetween ByteStrings or ByteArrays).
; [Constructor] ConverterTranscoder(from, to)
: Where from and to are the encoding names.
; [Method] push(byteStringOrArray[, outputByteArray])
Example:
Another example:
output = new ByteArray()
while (input = readSomeByteFromSomewhere()) {
}
// output is the complete conversion of all the input chunks concatenated now
(See [[ServerJS/Encodings/OldClass]] for another API.)