|
|
вернуться в форумHow to make 7-bit char? (+) Послано AlMag 23 май 2007 11:50 As all symbols in the input will have codes less that 128 I can convert it to 7-bit char. Theoretically) But what shall I do?... Re: How to make 7-bit char? (+) I got AC with this algo, using Pascal; use bitwise operators to compress (shl/shr/or/and); Be carefull with freepascal: it not allow code strings longer than 255 and string constants longer than 255; do not forget to escape #10, #13, #26, and enclose single-quot ' You must also escape #0, and consider that #0 mean "String-end" int ASCIIZ-string representation, but if you using 7-bit encoding, #0 will appear in your output only if input contais '@' (#64) followed by symbol with code less than 31. By problem condition there only CR LF (#13 #10) less than #32, and should not be @, so, #0 will never appear in your output |
|
|