Commit graph

34717 commits

Author SHA1 Message Date
Andrew Kelley
eb17d4562a std.Io.Writer.Hashed: fix bad assert 2025-07-31 22:36:52 -07:00
Ian Johnson
d91744401f fetch: More Git fixes 2025-07-31 22:10:11 -07:00
Andrew Kelley
64814dc986 std.compress.flate.Decompress: respect stream limit 2025-07-31 22:10:11 -07:00
Andrew Kelley
6caa100f0d std.Io.Writer: fix wrong return value from fixedDrain 2025-07-31 22:10:11 -07:00
Andrew Kelley
a7808892f7 std.compress.flate.Decompress: be in indirect or direct mode
depending on whether buffered
2025-07-31 22:10:11 -07:00
Andrew Kelley
6eac56caf7 std.compress.flate.Decompress: allow users to swap out Writer 2025-07-31 22:10:11 -07:00
Andrew Kelley
2024abda6a std.debug.Dwarf: work around API deficiency
need to supply a big enough buffer when working with decompression
2025-07-31 22:10:11 -07:00
Andrew Kelley
95273337c5 fetch: remove checksum logic and fix new I/O API bugs
Thanks Ian Johnson for finding these
2025-07-31 22:10:11 -07:00
Andrew Kelley
c9ff068391 std.compress: fix discard impl and flate error detection 2025-07-31 22:10:11 -07:00
Andrew Kelley
165cd87c12 std.Io.Reader: don't set end to zero
because it may be used as a ring buffer
2025-07-31 22:10:11 -07:00
Andrew Kelley
111305678c std: match readVec fn prototype exactly
this is not necessary according to zig language, but works around a flaw
in the C backend
2025-07-31 22:10:11 -07:00
Andrew Kelley
ae67c26cab disable failing incremental test cases due to dwarf linker logic
tracked by #24634
2025-07-31 22:10:11 -07:00
Andrew Kelley
c49c90a42a fetch: update API usage 2025-07-31 22:10:11 -07:00
Andrew Kelley
4c04835a08 std.compress.zstd.Decompress: implement discard and readVec 2025-07-31 22:10:11 -07:00
Andrew Kelley
84e4343b0c fix test failures by adding readVec 2025-07-31 22:10:11 -07:00
Andrew Kelley
afe9f3a9ec std.compress.flate.Decompress: implement readVec and discard 2025-07-31 22:10:11 -07:00
Andrew Kelley
81af4f3efc link: update some dwarf code to non deprecated API 2025-07-31 22:10:11 -07:00
Andrew Kelley
3fff84a4a4 compiler: fix unit test compile errors
sorry, zip file creation has regressed because std lib no longer has a
deflate compression implementation
2025-07-31 22:10:11 -07:00
Andrew Kelley
6bcced31a0 fix 32-bit compilation 2025-07-31 22:10:11 -07:00
Andrew Kelley
42b10f08cc std.compress.flate.Decompress: delete bad unit tests
if I remove the last input byte from "don't read past deflate stream's
end" (on master branch), the test fails with error.EndOfStream. what,
then, is it supposed to be testing?
2025-07-31 22:10:11 -07:00
Andrew Kelley
5f790464b0 std.compress.flate.Decompress: hashing is out of scope
This API provides the data; applications can verify their own checksums.
2025-07-31 22:10:11 -07:00
Andrew Kelley
f3a38e30fa std.Io: delete SeekableStream
Alternative is to use File.Reader and File.Writer directly.
2025-07-31 22:10:11 -07:00
Andrew Kelley
4741a16d9a putting stuff back does not require mutation 2025-07-31 22:10:11 -07:00
Andrew Kelley
05ce1f99a6 compiler: update to new flate API 2025-07-31 22:10:11 -07:00
Andrew Kelley
2569f4ff85 simplify tossBitsEnding 2025-07-31 22:10:11 -07:00
Andrew Kelley
5bc63794cc fix takeBitsEnding 2025-07-31 22:10:11 -07:00
Andrew Kelley
63f496c4f9 make takeBits deal with integers only 2025-07-31 22:10:11 -07:00
Andrew Kelley
c00fb86db6 fix peekBitsEnding 2025-07-31 22:10:11 -07:00
Andrew Kelley
8ab91a6fe9 error.EndOfStream disambiguation 2025-07-31 22:10:11 -07:00
Andrew Kelley
f644f40702 implement tossBitsEnding 2025-07-31 22:10:11 -07:00
Andrew Kelley
2d8d0dd9b0 std.compress.flate.Decompress: unfuck the test suite 2025-07-31 22:10:11 -07:00
Andrew Kelley
c684b21b4f simplify test cases 2025-07-31 22:10:11 -07:00
Andrew Kelley
ac4fbb427b std.compress.flate.Decompress: don't compute checksums
These have no business being in-bound; simply provide the expected
values to user code for maximum flexibility.
2025-07-31 22:10:11 -07:00
Andrew Kelley
5f571f53d6 refactor gzip test cases
zig newbies love using for loops in unit tests
2025-07-31 22:10:11 -07:00
Andrew Kelley
e73ca2444e std.compress.flate.Decompress: implement peekBitsEnding and writeMatch 2025-07-31 22:10:11 -07:00
Andrew Kelley
7bf91d705c fix bit read not at eof 2025-07-31 22:10:11 -07:00
Andrew Kelley
73e5594c78 std.compress.flate.Decompress: fix bit read at eof 2025-07-31 22:10:11 -07:00
Andrew Kelley
9c8cb777d4 std.compress.flate.Decompress: implement more bit reading 2025-07-31 22:10:11 -07:00
Andrew Kelley
6509fa1cf3 std.compress.flate.Decompress: passing basic test case 2025-07-31 22:10:11 -07:00
Andrew Kelley
88ca750209 std.compress.flate.Decompress: add rebase impl 2025-07-31 22:10:11 -07:00
Andrew Kelley
fa410cc234 std.Io: delete BitReader 2025-07-31 22:10:11 -07:00
Andrew Kelley
1b43551190 std.Io: remove BitWriter 2025-07-31 22:10:11 -07:00
Andrew Kelley
824c157e0c std.compress.flate: finish reorganizing 2025-07-31 22:10:11 -07:00
Andrew Kelley
73c98ca0e6 simplify std.hash.Adler32 2025-07-31 22:10:11 -07:00
Andrew Kelley
a4f05a4588 delete flate implementation 2025-07-31 22:10:11 -07:00
Andrew Kelley
83513ade35 std.compress: rework flate to new I/O API 2025-07-31 22:10:11 -07:00
Chinmay Dalal
a2d21d6327 enable pwd.h functions for other OSes
also add the layout of `struct passwd` for DragonflyBSD
and FreeBSD:
 - c267aac007/include/pwd.h (L112)
 - https://cgit.freebsd.org/src/tree/include/pwd.h?id=d66f9c86fa3fd8d8f0a56ea96b03ca11f2fac1fb#n114
2025-08-01 04:34:45 +02:00
Andrew Kelley
0294e91451 std.Io.Reader: fix readVec at end 2025-07-31 19:26:12 -07:00
Jackson Wambolt
264bd7053e Sema: remove incorrect requireRuntimeBlock calls
Part of #22353

Resolves: #24273
Co-Authored-By: Matthew Lugg <mlugg@mlugg.co.uk>
2025-07-31 22:28:46 +01:00
mlugg
ac1e73e249 std.enums: fix EnumIndexer branch quota
It's quite silly to have this override which nonetheless makes
assumptions about the input type. Encode the actual complexity of the
sort.

Also, simplify the sorting logic, and fix a bug (grab min and max
*after* the sort, not *before*!)
2025-07-31 22:10:22 +01:00