35 Commits

Author SHA1 Message Date
Andrew Kelley
79f267f6b9 std.Io: delete GenericReader
and delete deprecated alias std.io
2025-08-29 17:14:26 -07:00
Andrew Kelley
558bea2a76 std.Io: delete CountingReader 2025-08-29 11:11:59 -07:00
Andrew Kelley
9860dd475a std: delete most remaining uses of GenericWriter 2025-08-28 18:30:57 -07:00
Andrew Kelley
57dbc9e74a std.Io: delete GenericWriter 2025-08-28 18:30:57 -07:00
Andrew Kelley
a0f9a5e78d std: more reliable HTTP and TLS networking
* std.Io.Reader: fix confused semantics of rebase. Before it was
  ambiguous whether it was supposed to be based on end or seek. Now it
  is clearly based on seek, with an added assertion for clarity.

* std.crypto.tls.Client: fix panic due to not enough buffer size
  available. Also, avoid unnecessary rebasing.

* std.http.Reader: introduce max_head_len to limit HTTP header length.
  This prevents crash in underlying reader which may require a minimum
  buffer length.

* std.http.Client: choose better buffer sizes for streams and TLS
  client. Crucially, the buffer shared by HTTP reader and TLS client
  needs to be big enough for all http headers *and* the max TLS record
  size. Bump HTTP header size default from 4K to 8K.

fixes #24872

I have noticed however that there are still fetch problems
2025-08-16 00:16:15 -07:00
Andrew Kelley
749f10af49 std.ArrayList: make unmanaged the default 2025-08-11 15:52:49 -07:00
Andrew Kelley
045bb14897 zig std: fix build failures 2025-08-08 17:17:53 -07:00
Andrew Kelley
8c9dfcbd0f std.Io: remove BufferedWriter 2025-08-08 17:17:53 -07:00
Andrew Kelley
94dd28b7f7 std.Io: delete CountingWriter 2025-08-07 22:26:42 -07:00
Andrew Kelley
262bfc5826 std.Io: delete LimitedReader 2025-08-07 10:04:52 -07:00
Andrew Kelley
e061445fc2 std.Io: delete BufferedReader 2025-08-07 10:04:52 -07:00
Matthew Lugg
fd9cfc39f5
Merge pull request #24199 from Justus2308/24106-fmt-casts
zig fmt: canonicalize nested cast builtin order
2025-08-07 10:55:03 +01:00
Andrew Kelley
196e36bbb2 std: remove BoundedArray
This use case is handled by ArrayListUnmanaged via the "...Bounded"
method variants, and it's more optimal to share machine code, versus
generating multiple versions of each function for differing array
lengths.
2025-08-05 09:56:02 -07:00
Justus Klausecker
7c35070b90 zig fmt: apply new cast builtin order 2025-08-03 14:59:56 +02: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
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
Kendall Condon
ecd3ea9bd2 DeprecatedReader.Adapted: fix EndOfStream handling 2025-07-28 21:41:19 -07:00
Andrew Kelley
04614d6ea1 std.Io.Reader: add rebase to the vtable
This eliminates a footgun and special case handling with fixed buffers,
as well as allowing decompression streams to keep a window in the output
buffer.
2025-07-26 20:00:25 -07:00
Andrew Kelley
b8955a2e0a std.Io.poll: update to new I/O API 2025-07-23 21:25:34 -07:00
Andrew Kelley
4fcb479de9 don't forget to advance in the deprecated adapter 2025-07-22 18:42:54 -07:00
Andrew Kelley
ec5cdb2fe3 std: fix deprecated writer not handling the buffer 2025-07-22 17:06:25 -07:00
Andrew Kelley
91640f5f81 give the Reader API adapter a buffer
it needs one or else it always asserts
2025-07-22 09:41:44 -07:00
Andrew Kelley
2ac81c76e3 std.Io: add deprecation warnings 2025-07-22 09:41:43 -07:00
Andrew Kelley
af0a02a2de std.Io: delete FindByteWriter
dead
2025-07-22 09:41:43 -07:00
Andrew Kelley
03a6892189 std.Io: delete ChangeDetectionStream
dead code
2025-07-22 09:41:43 -07:00
Andrew Kelley
d9a5a3e8c5 std.Io: delete MultiWriter
nah
2025-07-22 09:41:43 -07:00
Andrew Kelley
abed0f5129 std.Io: delete BufferedAtomicFile
this is now redundant
2025-07-22 09:41:43 -07:00
Andrew Kelley
a3efdd7279 std.Io: delete StreamSource
it shan't be missed
2025-07-22 09:41:43 -07:00
Andrew Kelley
d509bc933f std.Io: delete CWriter
it shan't be missed
2025-07-22 09:41:43 -07:00
John Benediktsson
6e86910e19
std.Io: Fix GenericReader.adaptToNewApi; add DeprecatedReader.adaptToNewApi (#24484) 2025-07-17 11:29:22 +00:00
Andrew Kelley
36f356254c align those @fieldParentPtr casts 2025-07-14 00:16:49 -07:00
Andrew Kelley
093fe02b75 add adaptToNewApi to std.Io.Reader as well 2025-07-14 00:14:21 -07:00
mochalins
61eff7b6dd std: Fix Io.Reader.Limited and add test 2025-07-11 17:46:14 +02:00
Andrew Kelley
5360968e03 std: rename io to Io in preparation
This commit is non-breaking.

std.io is deprecated in favor of std.Io, in preparation for that
namespace becoming an interface.
2025-07-11 01:16:27 +02:00