GB18030Decoder.d.ts 747 B

123456789101112131415161718192021222324
  1. import { Stream } from "../../common/Stream";
  2. /**
  3. * @constructor
  4. * @implements {Decoder}
  5. * @param {{fatal: boolean}} options
  6. */
  7. export declare class GB18030Decoder {
  8. readonly fatal: boolean;
  9. gb18030_first: number;
  10. gb18030_second: number;
  11. gb18030_third: number;
  12. constructor(options: {
  13. fatal: boolean;
  14. });
  15. /**
  16. * @param {Stream} stream The stream of bytes being decoded.
  17. * @param {number} bite The next byte read from the stream.
  18. * @return {?(number|!Array.<number>)} The next code point(s)
  19. * decoded, or null if not enough data exists in the input
  20. * stream to decode a complete code point.
  21. */
  22. handler(stream: Stream, bite: number): (number | Array<number>) | null;
  23. }