home *** CD-ROM | disk | FTP | other *** search
-
- Specifications for vec coding
-
- All lines before line with "yobufi" as the first characters are ignored
-
- Next character after "yobufi" indicates coding method. Currently '0', '1',
- '2', '3', 'a', 'i' or 'x'
-
- Next 8 characters are flags coded by 6 bit method (described later)
-
- Decoded 6 bytes:
- Byte 0:
- bit 0: indicates that CRC16 checksum is used
- bits 1-7: undefined, should be zero
-
- Byte 1:
- undefined, should be zero
-
- Byte 2:
- bits 0-3: mode flag type indicator:
- 0000 - No flags stored
- 0001 - Amiga flags: Byte 4 = 0, byte 5 = hsparwed
- 0010 - UNIX flags: Byte 4 = -------r, byte 5 = wxrwxrwx
- 0011 - Reserved for MS-DOS flags, details not defined yet
- Other values reserved and should not be used
-
- Byte 3: undefined, should be zero
-
- Bytes 4 and 5: mode flags
-
- The next characters to the end of the current line contain file name.
-
- At the beginning of next line begins the coded data:
-
- For coding methods 0, 1, 2, and 3:
-
- Character values should be 36...126 or 161...251
-
- Character values 36...126 -> numerical value 0...90
- Character values 161...251 -> numerical value 91...181
-
- Character 33 ('!') indicates end of coded data
-
- Data is coded to blocks of these characters. Block size depends on coding
- method used. End character '!' should be block aligned. Data may be breaked
- into lines at any point.
-
- Method '0' (6 bit method):
-
- Block = 8 code characters -> 6 bytes of data
-
- characters 0...5: bits 0...5 -> data bytes 0...5: bits 0...5
- character-6: bits 0 and 1 -> data-0: bits 6 and 7
- character-6: bits 2 and 3 -> data-1: bits 6 and 7
- character-6: bits 4 and 5 -> data-2: bits 6 and 7
- character-7: bits 0 and 1 -> data-3: bits 6 and 7
- character-7: bits 2 and 3 -> data-4: bits 6 and 7
- character-7: bits 4 and 5 -> data-5: bits 6 and 7
-
- Method '1' (6.5 bit method):
-
- Block = 16 code characters -> 13 bytes of data
-
- character-0 + 91 * character-1:
- bits 0...7 -> data-0: bits 0...7
- bits 8...12 -> data-8: bits 0...4
-
- character-2 + 91 * character-3:
- bits 0...7 -> data-1: bits 0...7
- bits 8...12 -> data-9: bits 0...4
-
- character-4 + 91 * character-5:
- bits 0...7 -> data-2: bits 0...7
- bits 8...12 -> data-10: bits 0...4
-
- character-6 + 91 * character-7:
- bits 0...7 -> data-3: bits 0...7
- bits 8...12 -> data-11: bits 0...4
-
- character-8 + 91 * character-9:
- bits 0...7 -> data-4: bits 0...7
- bits 8...12 -> data-12: bits 0...4
-
- character-10 + 91 * character-11:
- bits 0...7 -> data-5: bits 0...7
- bits 8...10 -> data-8: bits 5...7
- bits 11..12 -> data-11: bits 5...6
-
- character-12 + 91 * character-13:
- bits 0...7 -> data-6: bits 0...7
- bits 8...10 -> data-9: bits 5...7
- bits 11..12 -> data-12: bits 5...6
-
- character-14 + 91 * character-15:
- bits 0...7 -> data-7: bits 0...7
- bits 8...10 -> data-10: bits 5...7
- bits 11 -> data-11: bit 7
- bits 12 -> data-12: bit 7
-
- Method '2' (7 bit method):
-
- Block = 8 code characters -> 7 bytes of data.
-
- characters 0...6 bits 0...6 -> data bytes 0...6: bits 0...6
- character-7: bit 0 -> data-0: bit 7
- character-7: bit 1 -> data-1: bit 7
- character-7: bit 2 -> data-2: bit 7
- character-7: bit 3 -> data-3: bit 7
- character-7: bit 4 -> data-4: bit 7
- character-7: bit 5 -> data-5: bit 7
- character-7: bit 6 -> data-6: bit 7
-
- Method '3' (7.5 bit method):
-
- Block = 16 code characters -> 15 bytes of data.
-
- character-0 + 182 * character-1:
- bits 0...7 -> data-0: bits 0...7
- bits 8...14 -> data-8: bits 0...6
-
- character-2 + 182 * character-3:
- bits 0...7 -> data-1: bits 0...7
- bits 8...14 -> data-9: bits 0...6
-
- character-4 + 182 * character-5:
- bits 0...7 -> data-2: bits 0...7
- bits 8...14 -> data-10: bits 0...6
-
- character-6 + 182 * character-7:
- bits 0...7 -> data-3: bits 0...7
- bits 8...14 -> data-11: bits 0...6
-
- character-8 + 182 * character-9:
- bits 0...7 -> data-4: bits 0...7
- bits 8...14 -> data-12: bits 0...6
-
- character-10 + 182 * character-11:
- bits 0...7 -> data-5: bits 0...7
- bits 8...14 -> data-13: bits 0...6
-
- character-12 + 182 * character-13:
- bits 0...7 -> data-6: bits 0...7
- bits 8...14 -> data-14: bits 0...6
-
- character-14 + 182 * character-15:
- bits 0...7 -> data-7: bits 0...7
- bit 8 -> data-8: bit 7
- bit 9 -> data-9: bit 7
- bit 10 -> data-10: bit 7
- bit 11 -> data-11: bit 7
- bit 12 -> data-12: bit 7
- bit 13 -> data-13: bit 7
- bit 14 -> data-14: bit 7
-
- Method 'x' (hexdump):
-
- Character values should be 48...57 or 65...70 (ASCII '0'...'9', 'A'...'F')
-
- Character values 48...57 -> numerical value 0...9
- Character values 65...70 -> numerical value 10...15
-
- Character 33 ('!') indicates end of coded data
-
- Block = 2 code characters -> 1 byte of data.
-
- character-0:
- data-0: bits 4...7
-
- character-1:
- data-0: bits 0...3
-
- Method 'a' (ASCII)
-
- Character values should be 32...126 (' '...'~')
-
- Characters 32...91, 93 and 95...126 represent those characters literally
-
- End of line represents character 10 (LF) except when preceded by character
- 94 ('^').
-
- Character 94 ('^') followed by character 64...95 represents characters
- 0...31
-
- Character 94 ('^') followed by character 96...126 represents characters
- 128...158
-
- Character 92 ('\') followed by character 32...126 represents characters
- 160...254
-
- Character 94 ('^') at end of line represents nothing and forces that EOL
- to represent nothing instead of LF.
-
- Special strings:
- "^!" -> end of file.
- "^;" -> character 255
- "^<" -> character 92 ('\')
- "^=" -> character 94 ('^')
- "^>" -> character 159
- "^?" -> character 127 (DEL)
-
- Character 94 ('^') followed by character 32 or 33...58 is to be taken
- literally.
-
- Method 'i' (ISO 8859-1)
-
- Like method 'a', but characters 160...255, character 92 ('\') and strings
- "^;" and "^<" are to be taken literally.
-
- In methods '0'...'3' and 'x' the next character after '!' is a hexadecimal
- digit indicating how many characters at the end of the last block should be
- ignored.
-
- If the CRC16 checking is on, then the next four characters are the
- checksum in hexadecimal.
-
- Letters in hex digits must be in upper case.
-
- Rest of the file may contain trash or more encoded files.
-
-