File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ export class ReaderBase {
1414 return this . offset ;
1515 }
1616
17+ public get length ( ) {
18+ return this . buffer . length ;
19+ }
20+
1721 public readBuffer ( bytes :number ) {
1822 const value = this . buffer . subarray ( this . offset , this . offset + bytes ) ;
1923 this . offset += bytes ;
Original file line number Diff line number Diff line change @@ -14,6 +14,14 @@ export class WriterBase {
1414 this . resizable = size === 0 ;
1515 }
1616
17+ public get writeOffset ( ) {
18+ return this . offset ;
19+ }
20+
21+ public get length ( ) {
22+ return this . buffer . length ;
23+ }
24+
1725 public toBuffer ( ) {
1826 return this . buffer ;
1927 }
Original file line number Diff line number Diff line change 11{
22 "name" : " bufferstuff" ,
3- "version" : " 1.4.0 " ,
3+ "version" : " 1.4.1 " ,
44 "description" : " A set of utility classes for reading and writing binary data in NodeJS and the browser" ,
55 "main" : " ./lib/index.js" ,
66 "types" : " ./lib/index.d.ts" ,
You can’t perform that action at this time.
0 commit comments