MCPcopy Create free account
hub / github.com/Shazbot/WH3-Mod-Manager / addOffset

Function addOffset

src/packFileSerializer.ts:97–100  ·  view source on GitHub ↗
(offset: number)

Source from the content-addressed store, hash-verified

95const decompressPackedPayload = async (buffer: Buffer, context?: string): Promise<Buffer> => {
96 const offsets = [] as number[];
97 const addOffset = (offset: number) => {
98 if (offset < 0 || offset >= buffer.length) return;
99 if (!offsets.includes(offset)) offsets.push(offset);
100 };
101 addOffset(4);
102 addOffset(0);
103 for (let i = 0; i <= Math.min(32, buffer.length - 4); i++) {

Callers 1

decompressPackedPayloadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected