12/**3* Buffer is a bytes/Uint8Array type in javascript4* @example5* ```javascript6* const bytes = require('nuclei/bytes');7* const bytes = new bytes.Buffer();8* ```9* @example10* ```javascript11* const bytes = require('nuclei/bytes');12* // optionally it can accept existing byte/Uint8Array as input13* const bytes = new bytes.Buffer([1, 2, 3]);14* ```15*/16export class Buffer {171819// Constructor of Buffer20constructor() {}21/**22* Write appends the given data to the buffer.23* @example24* ```javascript25* const bytes = require('nuclei/bytes');26* const buffer = new bytes.Buffer();27* buffer.Write([1, 2, 3]);28* ```29*/30public Write(data: Uint8Array): Buffer {31return this;32}333435/**36* WriteString appends the given string data to the buffer.37* @example38* ```javascript39* const bytes = require('nuclei/bytes');40* const buffer = new bytes.Buffer();41* buffer.WriteString('hello');42* ```43*/44public WriteString(data: string): Buffer {45return this;46}474849/**50* Bytes returns the byte representation of the buffer.51* @example52* ```javascript53* const bytes = require('nuclei/bytes');54* const buffer = new bytes.Buffer();55* buffer.WriteString('hello');56* log(buffer.Bytes());57* ```58*/59public Bytes(): Uint8Array {60return new Uint8Array(8);61}626364/**65* String returns the string representation of the buffer.66* @example67* ```javascript68* const bytes = require('nuclei/bytes');69* const buffer = new bytes.Buffer();70* buffer.WriteString('hello');71* log(buffer.String());72* ```73*/74public String(): string {75return "";76}777879/**80* Len returns the length of the buffer.81* @example82* ```javascript83* const bytes = require('nuclei/bytes');84* const buffer = new bytes.Buffer();85* buffer.WriteString('hello');86* log(buffer.Len());87* ```88*/89public Len(): number {90return 0;91}929394/**95* Hex returns the hex representation of the buffer.96* @example97* ```javascript98* const bytes = require('nuclei/bytes');99* const buffer = new bytes.Buffer();100* buffer.WriteString('hello');101* log(buffer.Hex());102* ```103*/104public Hex(): string {105return "";106}107108109/**110* Hexdump returns the hexdump representation of the buffer.111* @example112* ```javascript113* const bytes = require('nuclei/bytes');114* const buffer = new bytes.Buffer();115* buffer.WriteString('hello');116* log(buffer.Hexdump());117* ```118*/119public Hexdump(): string {120return "";121}122123124/**125* Pack uses structs.Pack and packs given data and appends it to the buffer.126* it packs the data according to the given format.127* @example128* ```javascript129* const bytes = require('nuclei/bytes');130* const buffer = new bytes.Buffer();131* buffer.Pack('I', 123);132* ```133*/134public Pack(formatStr: string, msg: any): void {135return;136}137138139}140141142143