From bfebe2802cd7af836f91d3184f161cf3f59967ab Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Sun, 28 Jul 2024 17:51:23 +0000 Subject: [PATCH] build based on b7b3c3f --- 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 616afa1..13244f3 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 0a938e8..a925355 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 14c6a8f..72ad577 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 d294503..50fd7f3 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · BufferedStreams

Loading search...

    +Search · BufferedStreams

    Loading search...