File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/xetchunk-wasm/assembly Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const HASH_WINDOW_SIZE: i32 = 64;
99
1010export class Chunk {
1111 hash : Uint8Array ;
12- data : Uint8Array ;
12+ length : i32 ;
1313}
1414
1515// Type for the next() method return value
@@ -96,7 +96,7 @@ class XetChunker {
9696 if ( createChunk || ( isFinal && this . curChunkLen > 0 ) ) {
9797 const chunkData = this . chunkBuf . subarray ( 0 , this . curChunkLen ) ;
9898 const chunk : Chunk = {
99- data : chunkData ,
99+ length : chunkData . length ,
100100 hash : blake3 ( chunkData ) ,
101101 } ;
102102 this . curChunkLen = 0 ;
@@ -114,6 +114,7 @@ class XetChunker {
114114 while ( pos < data . length ) {
115115 const result = this . next ( data . subarray ( pos ) , isFinal ) ;
116116 if ( result . chunk ) {
117+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
117118 chunks . push ( result . chunk ! ) ;
118119 }
119120 pos += result . bytesConsumed ;
You can’t perform that action at this time.
0 commit comments