dweiller
31cc4605ab
std.compress.zstandard: fix errors and crashes in ZstandardStream
2023-02-20 09:09:06 +11:00
dweiller
55e6e9409c
std.compress.zstandard: fix content size check
2023-02-20 09:09:06 +11:00
dweiller
6d48b055af
std.compress.zstandard: add decodeFrameHeader
...
Also do some other minor API cleanup
2023-02-20 09:09:06 +11:00
dweiller
3975a9d7ca
std.compress.zstandard: error when FSE bitstream is no fully consumed
2023-02-20 09:09:06 +11:00
dweiller
77ca1f7859
std.compress.zstandard: remove UnusedBitSet error
2023-02-20 09:09:06 +11:00
dweiller
d9a90e1818
std.compress.zstandard: fix decodeAlloc() and remove decodeFrameAlloc()
2023-02-20 09:09:06 +11:00
dweiller
2134769436
std.compress.zstandard: validate skippable frame size
2023-02-20 09:09:06 +11:00
dweiller
98bbd959b0
std.compress.zstandard: improve block size validation
2023-02-20 09:09:06 +11:00
dweiller
ece52e0771
std.compress.zstandard: verify content size and fix crash
2023-02-20 09:09:06 +11:00
dweiller
a9c8376305
std.compress.zstandard: make ZstandardStream decode multiple frames
2023-02-20 09:09:06 +11:00
dweiller
06ab5a2cd2
std.compress.zstandard: add multi-frame decoding functions
2023-02-20 09:09:06 +11:00
dweiller
a625df4636
std.compress.zstandard: fix fse decoding crash
2023-02-20 09:09:06 +11:00
dweiller
1c509f483a
std.compress.zstandard: fix crashes
2023-02-20 09:09:06 +11:00
dweiller
596a97fb55
std.compress.zstandard: fix crashes
2023-02-20 09:09:06 +11:00
dweiller
a651704876
std.compress.zstandard: free allocated result on error
2023-02-20 09:09:06 +11:00
dweiller
3f1c4306ca
std.compress.zstandard: fix capitalisation of Zstandard
2023-02-20 09:09:06 +11:00
dweiller
ddeabc9aa7
std.compress.zstandard: add decodeFrameAlloc()
2023-02-20 09:09:06 +11:00
dweiller
89f9c5cb37
std.compress.zstandard: improve doc comments
2023-02-20 09:09:06 +11:00
dweiller
7e2755646f
std.compress.zstandard: split decompressor into multiple files
2023-02-20 09:09:06 +11:00
dweiller
6e3e72884b
std.compress.zstandard: fix crashes
2023-02-20 09:09:06 +11:00
dweiller
a180fcc93d
std.compress.zstandard: add ZstandardStream
2023-02-20 09:09:06 +11:00
dweiller
5723291444
std.compress.zstandard: add decodeBlockReader
2023-02-20 09:09:06 +11:00
dweiller
947ad3e268
std.compress.zstandard: add FrameContext and add literals into DecodeState
2023-02-20 09:09:06 +11:00
dweiller
2d35c16ee7
std.compress.zstandard: add init/deinit for ring buffer, fix len()
2023-02-20 09:09:06 +11:00
dweiller
e92575d3d4
std.compress.zstandard: verify checksum in decodeFrameAlloc()
2023-02-20 09:09:06 +11:00
dweiller
3bfba36548
std.compress.zstandard: clean up error sets and line lengths
2023-02-20 09:09:06 +11:00
dweiller
3c06e2e7d0
std.compress.zstandard: add doc comments for RingBuffer
2023-02-20 09:09:06 +11:00
dweiller
1e5b8be509
std.compress.zstandard: add window size limit param
2023-02-20 09:09:06 +11:00
dweiller
e2306ef0a0
std.compress.zstandard: add integer casts u64 -> usize
2023-02-20 09:09:06 +11:00
dweiller
7558bf6451
std.compress.zstandard: minor cleanup and add doc comments
2023-02-20 09:09:06 +11:00
dweiller
ab18adf5c3
std.compress.zstandard: remove debug logging
2023-02-20 09:09:06 +11:00
dweiller
d40b135e95
std.compress.zstandard: properly track consumed count in decodeFrameBlocks
2023-02-20 09:09:06 +11:00
dweiller
774e2f5a5c
std.compress.zstandard: add input length safety checks
2023-02-20 09:09:06 +11:00
dweiller
31d1cae8c6
std.compress.zstandard: validate fse table value count
2023-02-20 09:09:06 +11:00
dweiller
95953e1ee6
std.compress.zstandard: fix dictionary field size
2023-02-20 09:09:06 +11:00
dweiller
6b85373875
std.compress.zstandard: validate sequence lengths
2023-02-20 09:09:06 +11:00
dweiller
082acd7f17
std.compress.zstandard: clean up integer casts
2023-02-20 09:09:06 +11:00
dweiller
fc64c279a4
std.compress.zstandard: clean up api
2023-02-20 09:09:06 +11:00
dweiller
cbfaa876d4
std.compress.zstandard: cleanup ReverseBitReader
2023-02-20 09:09:05 +11:00
dweiller
c819e58c20
std.compress.zstandard: add decodeZStandardFrameAlloc
...
This is a convenience wrapper - best to use `decodeZStandardFrame()` if
the content size is known, or directly use `decodeBlockRingBuffer()`.
2023-02-20 09:09:05 +11:00
dweiller
05e63f241e
std.compress.zstandard: add functions decoding into ring buffer
...
This supports decoding frames that do not declare the content size or
decoding in a streaming fashion.
2023-02-20 09:09:05 +11:00
dweiller
18091723d5
std.compress.zstandard: cleanup decodeBlock
2023-02-20 09:09:05 +11:00
dweiller
61cb514387
std.compress: add zstandard decompressor
2023-02-20 09:09:05 +11:00
dweiller
19984d8751
std.hash: add XxHash64 and XxHash32
2023-02-20 09:09:05 +11:00
Andrew Kelley
adfc019d60
Merge pull request #11982 from marler8997/ignoreSigpipe
...
ignore SIGPIPE by default
2023-02-19 13:55:12 -05:00
Andrew Kelley
02f5d2673f
Revert "Merge pull request #14661 from evacchi/zig-wasi-preopens"
...
This reverts commit 772a0eb68ac95b7e24508580499b49872fdb541f, reversing
changes made to 0bb178bbb2451238a326c6e916ecf38fbc34cab1.
This needs a rebase against master branch - it has build-breaking merge
conflicts. I also added a "changes requested" review on the original
pull request.
2023-02-19 09:40:55 -07:00
Luuk de Gram
772a0eb68a
Merge pull request #14661 from evacchi/zig-wasi-preopens
2023-02-19 17:09:58 +01:00
Andrew Kelley
0bb178bbb2
Merge pull request #14671 from ziglang/multi-object-for
...
implement multi-object for loops
2023-02-19 10:10:59 -05:00
Tom Read Cutting
346ec15c50
Correctly handle carriage return characters according to the spec ( #12661 )
...
* Scan from line start when finding tag in tokenizer
This resolves a crash that can occur for invalid bytes like carriage
returns that are valid characters when not parsed from within literals.
There are potentially other edge cases this could resolve as well, as
the calling code for this function didn't account for any potential
'pending_invalid_tokens' that could be queued up by the tokenizer from
within another state.
* Fix carriage return crash in multiline string
Follow the guidance of #38 :
> However CR directly before NL is interpreted as only a newline and not part of the multiline string. zig fmt will delete the CR.
Zig fmt already had code for deleting carriage returns, but would still
crash - now it no longer does so. Carriage returns encountered before
line-feeds are now appropriately removed on program compilation as well.
* Only accept carriage returns before line feeds
Previous commit was much less strict about this, this more closely
matches the desired spec of only allow CR characters in a CRLF pair, but
not otherwise.
* Fix CR being rejected when used as whitespace
Missed this comment from ziglang/zig-spec#83 :
> CR used as whitespace, whether directly preceding NL or stray, is still unambiguously whitespace. It is accepted by the grammar and replaced by the canonical whitespace by zig fmt.
* Add tests for carriage return handling
2023-02-19 14:14:03 +02:00
The Potato Chronicler
281d4c0ff6
Fix grammatical error in doc comment
2023-02-19 14:12:09 +02:00