diff --git a/dev/index.html b/dev/index.html index 503d183..616afa1 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 a8a511d..0a938e8 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 7f28041..14c6a8f 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 4b50e88..d294503 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · BufferedStreams

Loading search...

    +Search · BufferedStreams

    Loading search...