Use existing gunzipAsync for DEFLATE decompression
- Replace Bun.gunzip() with existing gunzipAsync utility - gunzipAsync is already imported and used elsewhere in the codebase - This should properly handle DEFLATE compression in ZIP files - Fixes metadata.json and all compressed file processing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
b7346330ff
commit
d5bf648fe6
|
|
@ -479,15 +479,10 @@ export const deploy = {
|
|||
// No compression, return data as-is
|
||||
return compressedData;
|
||||
} else if (compressionMethod === 8) {
|
||||
// DEFLATE compression - decompress using Bun
|
||||
// DEFLATE compression - decompress using gunzipAsync
|
||||
try {
|
||||
const decompressed = Bun.gunzip(compressedData);
|
||||
if (decompressed) {
|
||||
return new Uint8Array(decompressed);
|
||||
} else {
|
||||
console.warn(`[WARN] Failed to decompress ${entry.filename} with method ${compressionMethod}`);
|
||||
return compressedData;
|
||||
}
|
||||
const decompressed = await gunzipAsync(compressedData);
|
||||
return new Uint8Array(decompressed);
|
||||
} catch (error) {
|
||||
console.warn(`[WARN] Failed to decompress ${entry.filename} with method ${compressionMethod}:`, error.message);
|
||||
return compressedData;
|
||||
|
|
|
|||
Loading…
Reference in New Issue