Decompress and decode SOG(S) files in JS and add support for unbundled SOG files#389
Open
mrxz wants to merge 3 commits into
Open
Decompress and decode SOG(S) files in JS and add support for unbundled SOG files#389mrxz wants to merge 3 commits into
mrxz wants to merge 3 commits into
Conversation
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR builds upon #380
Instead of decompressing SOG(S) files and decoding their WebP images on the Rust side, this PR moves it to the JS side. This allows the Rust dependencies
zipandimageto be omitted from the bundle. Additionally it makes it possible to support unbundled SOG files. For thebuild-lodcommand the current behaviour is retained as it does not have a JS component. This is handled with a Cargo feature forspark-libthat allows to conditionally compile the desired implementation.The unzipping currently happens synchronously after which the image decoding can start in parallel. An async approach would be nicer, but sadly
fflatecontains a bug preventing this from working reliably (101arrowz/fflate#208).In terms of bundle size reduction (#321) this PR has the following effect:
The unbundled SOG support does require passing the right
SplatFileType(not auto-detected), but the main reason for reintroducing support is the prospect of supporting Streamed SOG files (#375).