From d2d92436896ab723755f5cfe438b0e314d8d1273 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Fri, 2 Feb 2024 21:40:15 +0000 Subject: [PATCH] build based on 8983f1f --- dev/index.html | 2 +- dev/inputstreams/index.html | 2 +- dev/outputstreams/index.html | 2 +- dev/search/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/index.html b/dev/index.html index 61fd5e7..a8a747f 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,3 +1,3 @@ Home · BufferedStreams

BufferedStreams

Build Status codecov Project Status: Inactive Chat on Discord

Description

BufferedStreams provides buffering for IO operations. It can wrap any IO type automatically making incremental reading and writing faster.

Installation

using Pkg
-Pkg.add("BufferedStreams")
+Pkg.add("BufferedStreams") diff --git a/dev/inputstreams/index.html b/dev/inputstreams/index.html index 92f45d0..273b700 100644 --- a/dev/inputstreams/index.html +++ b/dev/inputstreams/index.html @@ -12,4 +12,4 @@ println(ASCIIString(takeanchored!(stream))) end read(stream, UInt8) -end +end diff --git a/dev/outputstreams/index.html b/dev/outputstreams/index.html index 4b06715..7bdfe6b 100644 --- a/dev/outputstreams/index.html +++ b/dev/outputstreams/index.html @@ -2,4 +2,4 @@ Output Streams · BufferedStreams

BufferedOutputStream

stream = BufferedOutputStream(open(filename, "w")) # wrap an IOStream

BufferedOutputStream is the converse to BufferedInputStream, wrapping a sink type. It also works on any writable IO type, as well the more specific sink interface:

writebytes(sink::T, buffer::Vector{UInt8}, n::Int, eof::Bool)

This function should consume the first n bytes of buffer. The eof argument is used to indicate that there will be no more input to consume. It should return the number of bytes written, which must be n or 0. A return value of 0 indicates data was processed but should not be evicted from the buffer.

BufferedOutputStream as an alternative to IOBuffer

BufferedOutputStream can be used as a simpler and often faster alternative to IOBuffer for incrementally building strings.

out = BufferedOutputStream()
 print(out, "Hello")
 print(out, " World")
-str = String(take!(out))
+str = String(take!(out)) diff --git a/dev/search/index.html b/dev/search/index.html index 9357d55..f79a33f 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · BufferedStreams

Loading search...

    +Search · BufferedStreams

    Loading search...