Skip to content

Commit

Permalink
switch to new package index, decompress into .tar in javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettgu10 committed Apr 15, 2024
1 parent 436b5d7 commit 49974e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 5 additions & 4 deletions build/pyodide_bucket.bzl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Do not edit this file by hand. See docs/pyodide.md for info on how to generate it.
# These variables are factored out here because they are being shared by the WORKSPACE files in
# both edgeworker and workerd, as well as src/pyodide/BUILD.bazel
PYODIDE_PACKAGE_BUCKET_URL = "https://pub-45d734c4145d4285b343833ee450ef38.r2.dev/20240320/"
PYODIDE_GITHUB_RELEASE_URL = "https://github.com/cloudflare/pyodide-build-scripts/releases/download/20240320/"
PYODIDE_LOCK_SHA256 = "a176311d4c449aac4ef7a333977af8b6e08224c115a9a6d05c04592c841b8a58"
PYODIDE_PACKAGES_TAR_ZIP_SHA256 = "e191bae60aad75f6a9c33fac5c0ff1ad2b0e564bdd7a07fbdc848df4b62c60a1"
PYODIDE_PACKAGE_BUCKET_URL = "https://pub-45d734c4145d4285b343833ee450ef38.r2.dev/20240412-experimental/"
PYODIDE_GITHUB_RELEASE_URL = "https://github.com/cloudflare/pyodide-build-scripts/releases/download/20240412-experimental/"
PYODIDE_LOCK_SHA256 = "db29ebb43fcd05cbc6fcba051ec7eb61a9a1bc4210353e29fdad57c6f9be1a5a"
PYODIDE_PACKAGES_TAR_ZIP_SHA256 = "6579f114f007ac307c55c221f1b5018e30c95a3cc45b86a334bbbfa442c1bf1b"
PYODIDE_ALL_WHEELS_ZIP_SHA256 = "f8a34a284a7bc2ffc44ae86a160423a8aaf8cbb88eca268e1ea9300a187cf3af"
5 changes: 4 additions & 1 deletion src/pyodide/internal/builtin_wrappers.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ export function patchFetch(origin) {

// we didn't find it in the disk cache, continue with original fetch
const response = await origFetch(url, options);
const arrayBuffer = await response.arrayBuffer();

const arrayBuffer = await new Response(response.body.pipeThrough(new DecompressionStream("gzip"))).arrayBuffer();

console.log("decompressed", fileName, arrayBuffer.byteLength, "bytes");
DiskCache.put(fileName, arrayBuffer);
return new Response(arrayBuffer);
};
Expand Down

0 comments on commit 49974e5

Please sign in to comment.