src/ccutil/unicharcompress.cpp
int UnicharCompress::EncodeUnichar(unsigned unichar_id, RecodedCharID *code) const {
  if (unichar_id >= encoder_.size()) {
    return 0;
  }
  *code = encoder_[unichar_id];
  return code->length();
}
// Encodes a single unichar_id. Returns the length of the code, or zero if
// invalid input, and the encoding itself
Encodes a single unichar_id. Returns the length of the code, or zero if
invalid input, and the encoding itself
Encodes a single unichar_id . Returns the length of the code or zero if invalid input and the encoding itself
int UnicharCompress::EncodeUnichar(unsigned unichar_id, RecodedCharID *code) const {
  if (unichar_id >= encoder_.size()) {
    return 0;
  }
  *code = encoder_[unichar_id];
  return code->length();
}
int UnicharCompress :: EncodeUnichar ( unsigned unichar_id , RecodedCharID * code ) const { if ( unichar_id >= encoder_ . size ( ) ) { return 0 ; } * code = encoder_ [ unichar_id ] ; return code -> length ( ) ; }
Encodes a single unichar_id.
Encodes a single unichar_id .