tinyimg 1.0.0
Lightweight image manipulation library for Cloudflare Workers
Loading...
Searching...
No Matches
TinyWriter Struct Reference

A grow on demand byte sink. More...

#include <util.h>

Public Attributes

uint8_t * data
size_t size
size_t capacity
int error

Detailed Description

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.

Member Data Documentation

◆ capacity

size_t TinyWriter::capacity

How many bytes data can hold before it has to grow.

◆ data

uint8_t* TinyWriter::data

The bytes written so far, or NULL before the first write.

◆ error

int TinyWriter::error

TINYIMG_OK, or the first failure, after which writes do nothing.

◆ size

size_t TinyWriter::size

How many bytes have been written.


The documentation for this struct was generated from the following file: