public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex) { for(int i = 0, ib = 0; i < charCount; i++, ib++) { char ch = chars[i+charIndex]; byte code; if(!c2b.TryGetValue(ch, out code)) { ib -= 1; continue; } bytes[ib+byteIndex] = code; } return charCount; }