Skip to content

Commit 980f6da

Browse files
cmdcolinclaude
andcommitted
remove SharedArrayBuffer worker pool (SAB-specific, belongs on feature branch)
- delete crate/src/worker-entry.js and crate/webpack.worker.config.js - delete src/workerPool.ts, src/workerPoolClient.ts, src/workerPoolHost.ts - delete src/wasm/bgzf-worker-inlined.js, src/wasm/bgzf-worker-source.ts - remove dead code from src/unzip.ts (assembleChunkSliceResult, unused imports) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c0d8ba7 commit 980f6da

8 files changed

Lines changed: 0 additions & 994 deletions

File tree

crate/src/worker-entry.js

Lines changed: 0 additions & 42 deletions
This file was deleted.

crate/webpack.worker.config.js

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/unzip.ts

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { ungzip } from 'pako-esm2'
22

3-
import { type BgzfBlockInfo } from './bgzfBlockScan.ts'
4-
import { concatUint8Array } from './util.ts'
53
import {
64
decompressAll,
75
decompressChunkSlice,
@@ -72,51 +70,6 @@ export async function unzip(inputData: Uint8Array) {
7270
}
7371
}
7472

75-
function assembleChunkSliceResult(
76-
decompressedBlocks: Uint8Array[],
77-
blockInfos: BgzfBlockInfo[],
78-
minv: VirtualOffset,
79-
maxv: VirtualOffset,
80-
) {
81-
const cpositions: number[] = []
82-
const dpositions: number[] = []
83-
const slices: Uint8Array[] = []
84-
let dpos = minv.dataPosition
85-
86-
for (let i = 0; i < decompressedBlocks.length; i++) {
87-
const block = decompressedBlocks[i]!
88-
const info = blockInfos[i]!
89-
const isFirst = i === 0
90-
const isLast = info.filePosition >= maxv.blockPosition
91-
92-
cpositions.push(info.filePosition)
93-
dpositions.push(dpos)
94-
95-
const start = isFirst ? minv.dataPosition : 0
96-
const end = isLast
97-
? Math.min(maxv.dataPosition + 1, block.length)
98-
: block.length
99-
100-
if (start < end) {
101-
slices.push(block.subarray(start, end))
102-
}
103-
104-
dpos += block.length - start
105-
106-
if (isLast) {
107-
cpositions.push(info.filePosition + info.compressedSize)
108-
dpositions.push(dpos)
109-
break
110-
}
111-
}
112-
113-
return {
114-
buffer: concatUint8Array(slices),
115-
cpositions,
116-
dpositions,
117-
}
118-
}
119-
12073
export async function unzipChunkSlice(inputData: Uint8Array, chunk: Chunk) {
12174
const { minv, maxv } = chunk
12275
try {

src/wasm/bgzf-worker-inlined.js

Lines changed: 0 additions & 467 deletions
This file was deleted.

src/wasm/bgzf-worker-source.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/workerPool.ts

Lines changed: 0 additions & 264 deletions
This file was deleted.

0 commit comments

Comments
 (0)