aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Io/Writer.zig
AgeCommit message (Collapse)Author
2025-11-06std.Io.Writer.print: support .enum_literal in 't' format specifiersnoire
2025-10-29fix compilation errors introduced by rebasingAndrew Kelley
2025-10-29std: updating to std.Io interfaceAndrew Kelley
got the build runner compiling
2025-10-29std: start moving fs.File to IoAndrew Kelley
2025-10-27fix: make `compiler_rt` and `std.Io.Writer` compile on 16-bit platforms.GasInfinity
2025-10-08std: fix sendFileReading not accounting for bufferAndrew Kelley
Related to 1d764c1fdf04829cec5974d82cec901825a80e49 Test case provided by: Co-authored-by: Kendall Condon <goon.pri.low@gmail.com>
2025-09-21Merge pull request #25302 from ziglang/growCapacityAndrew Kelley
std: remove loop from growCapacity
2025-09-20coerce vectors to arrays rather than inline forAndrew Kelley
2025-09-20std: remove loop from growCapacityAndrew Kelley
I measured this against master branch and found no statistical difference. Since this code is simpler and logically superior due to always leaving sufficient unused capacity when growing, it is preferred over status quo.
2025-09-08std.Io.Writer.writeSliceEndian: add compile errorAndrew Kelley
check when an auto-layout struct is attempted to be memory reinterpreted and written out. it would be writing undefined memory
2025-09-05Revert "Merge pull request #24905 from gooncreeper/file-reader-buffered"Andrew Kelley
This reverts commit ac42eaaadd0650ffc281f9a1ed1a642fde8984b7, reversing changes made to 9fa2394f8c00d060931d69fb6f342f7f2e3d826e. I would like a chance to review this, please. I already spotted some issues.
2025-09-04sendFileAll: use stream instead of sendFileReadingKendall Condon
This is a simpler implementation and allows file_reader to do more optimal streaming.
2025-09-04fix sendFile implementations bypassing interface bufferKendall Condon
Also removes `File.Reader.read` since it is otherwise unused and is a footgun.
2025-08-31Io.Writer.Allocating: test new *Aligned methodsTravis Staloch
* added initAligned() * added missing @alignCast in toArrayListAligned()
2025-08-30upgrade more old API usesAndrew Kelley
2025-08-30rework std.Io.Writer.Allocating to support runtime-known alignmentAndrew Kelley
Also, breaking API changes to: * std.fs.Dir.readFileAlloc * std.fs.Dir.readFileAllocOptions
2025-08-28link.MachO: update to not use GenericWriterAndrew Kelley
2025-08-28std.Io.Writer: add toArrayList/fromArrayListAndrew Kelley
2025-08-19std.Io.Writer: fix upper case hex float formattingTemariVirus
2025-08-16Build.Step.Run: fix missing stdin buffer and flushIsaac Freund
Writer.sendFileAll() asserts non-zero buffer capacity in the case that the fallback is hit. It also requires the caller to flush. The buffer may be bypassed as an optimization but this is not a guarantee. Also improve the Writer documentation and add an earlier assert on buffer capacity in sendFileAll().
2025-08-16[std] fix compile error in std.Io.Writer.failingJosh Wolfe
2025-08-15std.compress.zstd.Decompress fixesAndrew Kelley
* std.Io.Reader: appendRemaining no longer supports alignment and has different rules about how exceeding limit. Fixed bug where it would return success instead of error.StreamTooLong like it was supposed to. * std.Io.Reader: simplify appendRemaining and appendRemainingUnlimited to be implemented based on std.Io.Writer.Allocating * std.Io.Writer: introduce unreachableRebase * std.Io.Writer: remove minimum_unused_capacity from Allocating. maybe that flexibility could have been handy, but let's see if anyone actually needs it. The field is redundant with the superlinear growth of ArrayList capacity. * std.Io.Writer: growingRebase also ensures total capacity on the preserve parameter, making it no longer necessary to do ensureTotalCapacity at the usage site of decompression streams. * std.compress.flate.Decompress: fix rebase not taking into account seek * std.compress.zstd.Decompress: split into "direct" and "indirect" usage patterns depending on whether a buffer is provided to init, matching how flate works. Remove some overzealous asserts that prevented buffer expansion from within rebase implementation. * std.zig: fix readSourceFileToAlloc returning an overaligned slice which was difficult to free correctly. fixes #24608
2025-08-14std.Io.Writer: introduce rebase to the vtableAndrew Kelley
fixes #24814
2025-08-13http: fix handling of limit in chunkedSendFileKendall Condon
`limit` in chunkedSendFile applies only to the file, not the entire chunk. `limit` in sendFileHeader does not include the header. Additionally adds a comment to clarify what `limit` applies to in sendFileHeader and fixed a small bug in it (`drain` is able to return less then `header.len`).
2025-08-13std.io.Writer.Allocating: rename getWritten() to written()Isaac Freund
This "get" is useless noise and was copied from FixedBufferWriter. Since this API has not yet landed in a release, now is a good time to make the breaking change to fix this.
2025-08-11Dwarf: port to new Writer APIJacob Young
2025-08-10Writer: Delete writePreserve/writeAllPreserveRyan Liptak
This is one way of partially addressing https://github.com/ziglang/zig/issues/24767 - These functions are unused - These functions are untested - These functions are broken + The same dangling pointer bug from 6219c015d8e8c958d96e5caa5ef0dbab9c414996 exists in `writePreserve` + The order of the bytes preserved in relation to the `bytes` being written can differ depending on unused buffer capacity at the time of the call and the drain implementation. If there ends up being a need for these functions, they can be fixed and added back.
2025-08-08std.Io.Writer.Allocating: configurable bump amountAndrew Kelley
2025-08-08std.Io.Writer.Allocating.sendFile: use logicalPosAndrew Kelley
fixes #24754 tested with `zig build test-std -Dskip-release`
2025-08-08Io.Writer fix dangling pointerIgor Anić
While underlying writer is Allocating writer buffer can grow in vtable.drain call. We should not hold pointer to the buffer before that call and use it after. This remembers positions instead of holding reference.
2025-08-07link.Dwarf: minimal changes to remove CountingWriterAndrew Kelley
2025-08-07http fixesAndrew Kelley
2025-07-31std.Io.Writer.Hashed: fix bad assertAndrew Kelley
2025-07-31fetch: More Git fixesIan Johnson
2025-07-31std.compress.flate.Decompress: respect stream limitAndrew Kelley
2025-07-31std.Io.Writer: fix wrong return value from fixedDrainAndrew Kelley
2025-07-31fetch: update API usageAndrew Kelley
2025-07-30std.Io.Reader: introduce readVec back into the VTableAndrew Kelley
simplifies and fixes things addresses a subset of #24608
2025-07-25Merge pull request #24559 from ziglang/zstdAndrew Kelley
std: rework zstd for new I/O API
2025-07-25Merge pull request #23340 from castholm/pass-null-to-b-dependencyAndrew Kelley
Add support for passing null, string literals, enum lists and more to `b.dependency()`
2025-07-25std.Io: add "preserve" variants to Reader/WriterAndrew Kelley
2025-07-22aarch64: add new from scratch self-hosted backendJacob Young
2025-07-21std.fs.File.Reader: fix missed advance writer positionsAndrew Kelley
2025-07-20Serialize float options using the hexadecimal formatCarl Åstholm
This ensures no information is lost when the value is round-tripped.
2025-07-20Merge pull request #24488 from ziglang/moreAndrew Kelley
std.zig: finish updating to new I/O API
2025-07-20std.Io.Writer: support alignment for `{t}` specifierMarc Tiehuis
2025-07-19std.Io.Writer: fix writeSliceSwapAndrew Kelley
tried to be too clever, wrote bad code
2025-07-19std.Io.Writer: add missing writeSliceSwapAndrew Kelley
2025-07-17std.io.Writer: remove requirement of a 2-byte buffer for extern unions (#24489)John Benediktsson
closes #24486
2025-07-16std.Io.Writer: fix writeStructAndrew Kelley