![]() |
tinyimg 1.0.0
Lightweight image manipulation library for Cloudflare Workers
|
A grow on demand byte sink. More...
#include <util.h>
Public Attributes | |
| uint8_t * | data |
| size_t | size |
| size_t | capacity |
| int | error |
A grow on demand byte sink.
Encoders write into one of these so no caller has to guess an output size. Writes latch the first failure into error and then do nothing, which means an encoder can emit a whole file and check once at the end.
| size_t TinyWriter::capacity |
How many bytes data can hold before it has to grow.
| uint8_t* TinyWriter::data |
The bytes written so far, or NULL before the first write.
| int TinyWriter::error |
TINYIMG_OK, or the first failure, after which writes do nothing.
| size_t TinyWriter::size |
How many bytes have been written.