Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions test/ingest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -836,10 +836,12 @@ describe("isBinaryContent", () => {
const buf = new Uint8Array(size);
buf.fill(0x20); // printable spaces
// Insert null bytes at every 1024th position (stride-aligned: 1024 = 2×512)
for (let i = 1024; i < size; i += 1024) {
// Start at 8192 to place nulls outside the first 8KB thorough scan (0–8191)
// Stop before the last 8KB window to place nulls outside the final thorough scan
for (let i = 8192; i < size - 8192; i += 1024) {
buf[i] = 0;
}
// Stride sampling at position 1024 catches the first null byte
// Stride sampling at stride position 1024 catches the first null byte
expect(isBinaryContent(buf)).toBe(true);
});

Expand Down
Loading