internal override unsafe int Decode( char[] chars, int startPos, int len ) {
Debug.Assert( chars != null );
Debug.Assert( len >= 0 );
Debug.Assert( startPos >= 0 );
Debug.Assert( chars.Length - startPos >= len );
if ( len == 0 ) {
return 0;
}
int bytesDecoded, charsDecoded;
fixed ( char* pChars = &chars[startPos] ) {
fixed ( byte* pBytes = &buffer[curIndex] ) {
Decode( pChars, pChars + len, pBytes, pBytes + ( endIndex - curIndex ), out charsDecoded, out bytesDecoded );
}
}
curIndex += bytesDecoded;
return charsDecoded;
}