Implement zstd for DecompressionStream
Categories
(Core :: DOM: Streams, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox138 | --- | fixed |
People
(Reporter: saschanaz, Assigned: nordzilla)
References
Details
Attachments
(4 files, 2 obsolete files)
We want this for internal usage as we already ship zstd. For that purpose having decoding-only is fine. Shipping would be blocked by standards consensus.
| Assignee | ||
Comment 1•1 year ago
•
|
||
I think I'd like to take this, so I'm assigning myself.
NOTE: I will be out tomorrow, and Monday is a US holiday, so if someone with higher context gets to this between now and Tuesday, feel free to take over, though my preference would be to finish this out next week.
I looked at this a bit today, and pushed up some WIP patches, more or less a 1:1 mirror of the ZLib version, but using third_party/zstd/lib/zstd.h instead. It's not ready for formal review yet, which is why it is still in WIP, but it is working.
I do have a few questions.
-
We define CompressionFormat here. If this is only to be supported for decompression for the time being, do I need to make a
DecompressionFormatequivalent? Or perhaps just add the enum variant and throw in theCompressionStreamif it getsCompressionFormat::Zstd? -
How can I ensure that this is supported only internally? Perhaps something like
[ChromeOnly]? -
Is it okay to modify the web platform tests with these updates if there isn't consensus on standardized adoption yet? If not, where would be the best place to put tests?
Thanks!
| Assignee | ||
Comment 2•1 year ago
|
||
| Assignee | ||
Comment 3•1 year ago
|
||
Comment 4•1 year ago
|
||
(In reply to Erik Nordin [:nordzilla] from comment #1)
- We define CompressionFormat here. If this is only to be supported for decompression for the time being, do I need to make a
DecompressionFormatequivalent? Or perhaps just add the enum variant and throw in theCompressionStreamif it getsCompressionFormat::Zstd?
Just add the enum in that list yes.
- How can I ensure that this is supported only internally? Perhaps something like
[ChromeOnly]?
I'm not sure that we can do [ChromeOnly] on an enum variant. We can throw in the ctor or something. Kagami will know for sure.
- Is it okay to modify the web platform tests with these updates if there isn't consensus on standardized adoption yet? If not, where would be the best place to put tests?
https://searchfox.org/mozilla-central/source/testing/web-platform/mozilla/tests is where we put WPTs that aren't quite standard. You can make a temporary copy.
| Assignee | ||
Comment 6•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 7•1 year ago
|
||
Renames ZLibHelper.h to be CompressionStreamHelper.h and attempts
to make shared functionality between various implementations of
CompressionStreamAlgorithms and DecompressionStreamAlgorithms as
easily shared as possible.
| Assignee | ||
Comment 8•1 year ago
|
||
Introduces a new static pref for the "zstd" format to be used
with CompressionStream and DecompressionStream. Rewrites our
current WPTs to utilize this pref instead of being forced to
construct the stream within a privileged context.
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 9•1 year ago
|
||
Removes the use of a temporary array from the DecompressionStreamAlgorithms
implementation of DecompressAndEnqueue, instead enqueuing each chunk as they
come rather than collecting all chunks into an array prior to enqueueing.
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 10•1 year ago
|
||
Comment 11•1 year ago
|
||
Backed out for causing build bustages
Backout link: https://hg.mozilla.org/integration/autoland/rev/499bd18c73010e6dc5379699bf030aafe8496d24
| Assignee | ||
Comment 12•1 year ago
|
||
Unfortunately, there was one spot that I neglected to update within a MOZ_ASSERT(), which only runs in debug builds.
All of the local and try builds that I ran were optimized :(
Queuing for re-landing.
Comment 13•1 year ago
|
||
Comment 14•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/4d38cd80339c
https://hg.mozilla.org/mozilla-central/rev/8e20d3170fb3
https://hg.mozilla.org/mozilla-central/rev/62564a163d7b
https://hg.mozilla.org/mozilla-central/rev/782b2ffd766b
Comment 15•1 year ago
|
||
This lead to a 4KB increase in installer size on Windows, which is below any threshold for alerts. Consider this comment as only a FYI.
Description
•