UNPKG

@stricahq/cbors

Version:

cbor encoder and decoder with annotation

26 lines (25 loc) 641 B
/// <reference types="node" /> import { Buffer } from 'buffer'; import * as stream from 'stream'; declare class Decoder extends stream.Transform { private bl; private needed; private fresh; private _parser; private offset; private usedBytes; constructor(); static decode(inputBytes: Buffer): { bytes: Buffer; value: any; }; private readUInt64; private updateTracker; private readIndefiniteStringLength; private readLength; _transform(fresh: any, encoding: any, cb: any): any; private parse; private restart; _flush(cb: any): void; } export default Decoder;