File: README

package info (click to toggle)
hare 0.26.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,352 kB
  • sloc: asm: 1,374; makefile: 123; sh: 117; lisp: 101
file content (13 lines) | stat: -rw-r--r-- 740 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
memio: memory-backed I/O primitives

memio provides implementations of [[io::stream]] which can read from or write to
byte slices. [[fixed]] uses a caller-supplied buffer for storage, while
[[dynamic]] uses a dynamically allocated buffer which will grow instead of
erroring when writing past the end of the buffer. All memio streams are
seekable; the read-write head works the same way as an operating system file.
You can access the contents of the buffer via [[buffer]] and [[string]].

Additionally, memio provides string-related I/O operations. Each of the utility
functions (e.g. [[appendrune]]) work correctly with any [[io::handle]], but
for efficiency reasons it is recommended that they are either a memio:: or
[[bufio::]] stream.