UNPKG

@mrhiden/cstruct

Version:

For packing and unpacking bytes (C like structures) in/from Buffer based on Object/Array type for parsing.

26 lines (25 loc) 847 B
import { Type, SpecialType } from "./types"; export declare class ReadWriteBase { protected dynamicTypeLengthRegex: RegExp; protected staticTypeLengthRegex: RegExp; private stringTypes; private wstringTypes; private bufferTypes; private jsonTypes; protected getDynamicTypeLengthGroupsMatch(key: string): { [key: string]: string; }; protected getStaticTypeLengthGroupsMatch(key: string): { [key: string]: string; }; protected getSpecialType(modelType: Type): SpecialType | undefined; protected getStaticSize(size: string): { isStatic: boolean; staticSize: number; }; protected extractTypeAndSize(modelType: object | string, dynamicLength: string): { specialType: SpecialType | undefined; isStatic: boolean; staticSize: number; }; }