public void parseDocumentArea() { while (index < stop) { if (data[index] > 0 && data[index] < 33) { // parse default extended international characters WP6_FunctionKey key = new WP6_FunctionKey(data[index], 0); index++; if (WP6_DefaultExtendedInternationalCharacters.map.ContainsKey(key)) { WPStream.Add(new Character((WP6_DefaultExtendedInternationalCharacters.map[key]).ToString())); } } // add ascii character else if (data[index] > 32 && data[index] < 127) { WPStream.Add(new Character(data, index)); index++; } // parse single-byte function else if (data[index] > 127 && data[index] < 208) { SingleByteFunction sbf = new SingleByteFunction(data, index); if (!sbf.name.Equals(functionGroups.none)) { WPStream.Add(sbf); } index++; } //parse variable-length multi-byte functions else if (data[index] > 207 && data[index] < 227) { VariableLengthFunction function = ParseVariableLengthFunction.getfunction(document, index); index += function.size; if (!function.name.Equals(functionGroups.none)) { WPStream.Add(function); } } // parse fixed-length functions else if (data[index] > 239 && data[index] <= 255) { FixedLengthFunction function = ParseFixedLengthFunction.getFunction(document, index); index += function.size; if (!function.name.Equals(functionGroups.none)) { WPStream.Add(function); } } else { index++; } } }
public void parseDocumentArea() { while (index < stop) { if (data[index] > 0 && data[index] < 33) { // parse default extended international characters WP6_FunctionKey key = new WP6_FunctionKey(data[index], 0); index++; if (WP6_DefaultExtendedInternationalCharacters.map.ContainsKey(key)) { WPStream.Add(new Character((WP6_DefaultExtendedInternationalCharacters.map[key]).ToString())); } } // add ascii character else if (data[index] > 32 && data[index] < 127) { WPStream.Add(new Character(data, index)); index++; } // parse single-byte function else if (data[index] > 127 && data[index] < 208) { SingleByteFunction sbf = new SingleByteFunction(data, index); if (!sbf.name.Equals(functionGroups.none)) { WPStream.Add(sbf); } index++; } //parse variable-length multi-byte functions else if (data[index] > 207 && data[index] < 227) { VariableLengthFunction function = ParseVariableLengthFunction.getfunction(document, index); index += function.size; if (!function.name.Equals(functionGroups.none)) { WPStream.Add(function); } } // parse fixed-length functions else if (data[index] > 239 && data[index] <= 255) { FixedLengthFunction function = ParseFixedLengthFunction.getFunction(document, index); index += function.size; if (!function.name.Equals(functionGroups.none)) { WPStream.Add(function); } } } }