Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyodide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
pyodide
Commits
18f28a93
Commit
18f28a93
authored
Sep 22, 2018
by
Roman Yurchak
Committed by
GitHub
Sep 22, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #186 from mdboom/lz4-bugfix
Fix LZ4 decoding bug
parents
5fb84895
ec791200
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
.circleci/config.yml
.circleci/config.yml
+2
-2
emsdk/patches/lz4_c.patch
emsdk/patches/lz4_c.patch
+9
-3
No files found.
.circleci/config.yml
View file @
18f28a93
...
...
@@ -53,7 +53,7 @@ jobs:
-
restore_cache
:
keys
:
-
v1-emsdk-{{ checksum "emsdk/Makefile" }}-v
6
-
-
v1-emsdk-{{ checksum "emsdk/Makefile" }}-v
7
-
-
run
:
name
:
build
...
...
@@ -68,7 +68,7 @@ jobs:
paths
:
-
./emsdk/emsdk
-
~/.ccache
key
:
v1-emsdk-{{ checksum "emsdk/Makefile" }}-v
6
-{{ .BuildNum }}
key
:
v1-emsdk-{{ checksum "emsdk/Makefile" }}-v
7
-{{ .BuildNum }}
-
persist_to_workspace
:
root
:
.
...
...
emsdk/patches/lz4_c.patch
View file @
18f28a93
...
...
@@ -52,7 +52,7 @@ index 4c3f583b7..5291002a4 100644
var contents = stream.node.contents;
var compressedData = contents.compressedData;
var written = 0;
@@ -122,
6 +117,8
@@
mergeInto(LibraryManager.library, {
@@ -122,
11 +117,14
@@
mergeInto(LibraryManager.library, {
var chunkIndex = Math.floor(start / LZ4.CHUNK_SIZE);
var compressedStart = compressedData.offsets[chunkIndex];
var compressedSize = compressedData.sizes[chunkIndex];
...
...
@@ -61,7 +61,13 @@ index 4c3f583b7..5291002a4 100644
var currChunk;
if (compressedData.successes[chunkIndex]) {
var found = compressedData.cachedIndexes.indexOf(chunkIndex);
@@ -138,18 +135,19 @@
mergeInto(LibraryManager.library, {
if (found >= 0) {
currChunk = compressedData.cachedChunks[found];
+ buffer.set(Module.HEAPU8.subarray(currChunk + startInChunk, currChunk + endInChunk), offset + written);
} else {
// decompress the chunk
compressedData.cachedIndexes.pop();
@@ -138,18 +136,19 @@
mergeInto(LibraryManager.library, {
Module['decompressedChunks'] = (Module['decompressedChunks'] || 0) + 1;
}
var compressed = compressedData.data.subarray(compressedStart, compressedStart + compressedSize);
...
...
@@ -89,7 +95,7 @@ index 4c3f583b7..5291002a4 100644
var currWritten = endInChunk - startInChunk;
written += currWritten;
}
@@ -181,4 +1
79
,3 @@
if (LibraryManager.library['$FS__deps']) {
@@ -181,4 +1
80
,3 @@
if (LibraryManager.library['$FS__deps']) {
warn('FS does not seem to be in use (no preloaded files etc.), LZ4 will not do anything');
}
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment