Rename decode_io_writer methods to transform_io

This commit is contained in:
Nigel Tao committed 2020-01-11 10:19:25 +11:00
1 parent ab0b2fd2aa
commit 5f8d2da74f
17 files changed
+168 -178

No files matched your search

+3 -3
View File
@@ -11,20 +11,20 @@ categories:
The general pattern is that a package `foo` (e.g. `jpeg`, `png`) contains a
struct `bar` (e.g. `hasher`, `decoder`, etc) that implements a
package-independent interface. For example, every compression decoder struct
would have a `decode_io_writer` method. In C, this would be invoked as
would have a `transform_io` method. In C, this would be invoked as
```
// Allocate and initialize the struct.
wuffs_foo__decoder* dec = etc;
// Do the work. Error checking is not shown, for brevity.
const char* status = wuffs_foo__decoder__decode_io_writer(dec, etc);
const char* status = wuffs_foo__decoder__transform_io(dec, etc);
```
When that C library is used as C++, that last line can be shortened:
```
const char* status = dec->decode_io_writer(etc);
const char* status = dec->transform_io(etc);
```
See also the [glossary](/doc/glossary.md), as well as the notes on:
+2 -4
View File
@@ -2,10 +2,8 @@
Compression decoders read from one input stream (an `io_reader` called `src`)
and write to an output stream (an `io_writer` called `dst`). Wuffs'
implementations have one key method: `decode_io_writer`, named after the
operation (decoding) and the type of the destination (an
[`io_writer`](/doc/note/io-input-output.md)). It incrementally decompresses the
source data.
implementations have one key method: `transform_io`. It incrementally
decompresses the source data.
This method is a [coroutine](/doc/note/coroutines.md), and does not require
either all of the input or all of the output to fit in a single contiguous