Commit graph

35 commits

Author SHA1 Message Date
dweiller
bd0dbb0a13 std.compress.zstd: enable tests for wasm32
The increase in stack size for wasm32 targets in commit d51aa9748f
allows the streaming decompressor to be tested on wasm32-wasi.
2024-02-27 11:37:48 -08:00
Ryan Liptak
16b3d1004e Remove redundant test name prefixes now that test names are fully qualified
Follow up to #19079, which made test names fully qualified.

This fixes tests that now-redundant information in their test names. For example here's a fully qualified test name before the changes in this commit:

"priority_queue.test.std.PriorityQueue: shrinkAndFree"

and the same test's name after the changes in this commit:

"priority_queue.test.shrinkAndFree"
2024-02-26 15:18:31 -08:00
Andrew Kelley
c44a902836 fix zstd compilation errors from previous commit 2024-02-23 02:37:11 -07:00
dweiller
5c12783094 std.compress.zstd: make DecompressStream options runtime 2024-02-23 02:37:11 -07:00
dweiller
accbba3cd8 std.compress.zstd: disable failing wasm32 tests
This commit can be reverted after
https://github.com/ziglang/zig/pull/18971 is merged.
2024-02-23 02:37:11 -07:00
dweiller
ac1b957e79 std.compress.zstd: remove allocation from DecompressStream 2024-02-23 02:37:11 -07:00
dweiller
73f6d3afb5 std.compress.zstd: fix decompressStreamOptions 2024-02-23 02:37:11 -07:00
dweiller
63fa151f1c std.compress.zstandard: fix buffer sizes
This change corrects the size of various internal buffers used. The
previous behavior did not cause validity problems but wasted space.
2024-02-23 02:37:11 -07:00
mlugg
51595d6b75
lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
dweiller
138a35df8f zstandard: fix division by zero when using RingBuffer
This change fixes some division-by-zero bugs introduced by the optimized
ring buffer read/write functions in d8c067966.

There are edge cases where decompression can use a length zero ring
buffer as the size of the ring buffer used is exactly the the window
size specified by a Zstandard frame, and this can be zero. Switching
away from loops to mem copies means that we need to ensure ring buffers
do not have length zero ring when attempting to read/write from them.
2023-11-10 15:18:16 -05:00
Jacob Young
509be7cf1f x86_64: fix std test failures 2023-11-03 23:18:21 -04:00
Andrew Kelley
3fc6fc6812 std.builtin.Endian: make the tags lower case
Let's take this breaking change opportunity to fix the style of this
enum.
2023-10-31 21:37:35 -04:00
Jacob Young
d890e81761 mem: fix ub in writeInt
Use inline to vastly simplify the exposed API.  This allows a
comptime-known endian parameter to be propogated, making extra functions
for a specific endianness completely unnecessary.
2023-10-31 21:37:35 -04:00
Jacob Young
27fe945a00 Revert "Revert "Merge pull request #17637 from jacobly0/x86_64-test-std""
This reverts commit 6f0198cadb.
2023-10-22 15:46:43 -04:00
Andrew Kelley
6f0198cadb Revert "Merge pull request #17637 from jacobly0/x86_64-test-std"
This reverts commit 0c99ba1eab, reversing
changes made to 5f92b070bf.

This caused a CI failure when it landed in master branch due to a
128-bit `@byteSwap` in std.mem.
2023-10-22 12:16:35 -07:00
Andrew Kelley
d8c067966f
Merge pull request #17400 from joadnacer/ringbuffer-optim
std.RingBuffer: Implement mem.copy read/write
2023-10-22 13:19:22 -04:00
joadnacer
a8eb70c9d7 compress: Improve RingBuffer usage 2023-10-21 19:20:12 +01:00
Jacob Young
32e85d44eb x86_64: disable failing tests, enable test-std testing 2023-10-21 10:55:41 -04:00
zooster
bc8e1e1de4
Improvements to docs and text
* docs(std.math): elaborate on difference between absCast and absInt

* docs(std.rand.Random.weightedIndex): elaborate on likelihood

I think this makes it easier to understand.

* langref: add small reminder

* docs(std.fs.path.extension): brevity

* docs(std.bit_set.StaticBitSet): mention the specific types

* std.debug.TTY: explain what purpose this struct serves

This should also make it clearer that this struct is not supposed to provide unrelated terminal manipulation functionality such as setting the cursor position or something because terminals are complicated and we should keep this struct simple and focused on debugging.

* langref(package listing): brevity

* langref: explain what exactly `threadlocal` causes to happen

* std.array_list: link between swapRemove and orderedRemove

Maybe this can serve as a TLDR and make it easier to decide.

* PrefetchOptions.locality: clarify docs that this is a range

This confused me previously and I thought I can only use either 0 or 3.

* fix typos and more

* std.builtin.CallingConvention: document some CCs

* langref: explain possibly cryptic names

I think it helps knowing what exactly these acronyms (@clz and @ctz) and
abbreviations (@popCount) mean.

* variadic function error: add missing preposition

* std.fmt.format docs: nicely hyphenate

* help menu: say what to optimize for

I think this is slightly more specific than just calling it
"optimizations". These are speed optimizations. I used the word
"performance" here.
2023-04-23 21:06:21 +03:00
dweiller
c6ef83efe5 std.compress.zstandard: clean up streaming API 2023-02-21 14:53:02 +11:00
dweiller
c7c35bf9e6 std.RingBuffer: add (non-concurrent) RingBuffer implementation 2023-02-21 12:58:34 +11:00
dweiller
1c518bd993 std.compress.zstandard: rename ZStandardStream -> DecompressStream 2023-02-21 12:58:27 +11:00
dweiller
12d9f73ce8 std.compress.zstandard: remove use of usingnamespace 2023-02-21 12:09:27 +11:00
dweiller
a74f800dd7 std.compress.zstandard: update for multi-for-loop change 2023-02-20 16:58:48 +11:00
dweiller
2766b704c1 std.compress.zstandard: add DictionaryIdFlagUnsupported ZstandardStream.Error 2023-02-20 09:09:06 +11:00
dweiller
1a862175d5 std.compress.zstandard: fix zstandardStream content size validation 2023-02-20 09:09:06 +11:00
dweiller
476d2fe1fa std.compress.zstandard: fix zstandardStream finishing early 2023-02-20 09:09:06 +11:00
dweiller
ee5af3c74c std.compress.zstandard: cleanup high-level api docs and error sets 2023-02-20 09:09:06 +11:00
dweiller
31cc4605ab std.compress.zstandard: fix errors and crashes in ZstandardStream 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
3f1c4306ca std.compress.zstandard: fix capitalisation of Zstandard 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
a180fcc93d std.compress.zstandard: add ZstandardStream 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
61cb514387 std.compress: add zstandard decompressor 2023-02-20 09:09:05 +11:00