This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert' show utf8; | |
/// Decodes a vis-encoded syslog string to a UTF-8 representation. | |
/// | |
/// Apple's syslog logs are encoded in 7-bit form. Input bytes are encoded as follows: | |
/// 1. 0x00 to 0x19: non-printing range. Some ignored, some encoded as <...>. | |
/// 2. 0x20 to 0x7f: as-is, with the exception of 0x5c (backslash). | |
/// 3. 0x5c (backslash): octal representation \134. | |
/// 4. 0x80 to 0x9f: \M^x (using control-character notation for range 0x00 to 0x40). | |
/// 5. 0xa0: octal representation \240. |