Skip to content

Remove JS based splat file format decoders - #374

Merged
dmarcos merged 2 commits into
sparkjsdev:mainfrom
mrxz:remove-js-decoders
Aug 24, 2026
Merged

Remove JS based splat file format decoders#374
dmarcos merged 2 commits into
sparkjsdev:mainfrom
mrxz:remove-js-decoders

Conversation

@mrxz

@mrxz mrxz commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Since the loading and decoding of splat formats has been moved to the spark-lib/spark-rs projects, the JS based decoders should be removed. Maintaining two implementations for each format is impractical and having it in the code base can cause confusion, not to mention bloats the bundle (#321).

The only component still depending on these JS based decoders was the transcodeSpz method (and corresponding compress-to-spz.js script), which has been rewritten to delegate to spark-rs as well. This has the added benefit that it now also supports all input formats, instead of being limited to a subset.

Warning

There is one clear behavioural change, the old JS based spz encoder produced SPZv3, whereas spark-rs generates SPZv2.

Ultimately the bundle size savings (for #321) is limited, though this does open up the possibility of eliminating the fflate dependency. Currently that is still needed for proper file type detection. But since that is also duplicated between JS and Rust, it might be possible to unify it as well.

@mrxz
mrxz force-pushed the remove-js-decoders branch from c6d1036 to 09d6c07 Compare June 17, 2026 13:52
@dmarcos
dmarcos merged commit 8a409c4 into sparkjsdev:main Aug 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants