Loading...
Searching...
No Matches
stream_cache.h
1#pragma once
2
3#include "stream.h"
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9typedef struct StreamCache StreamCache;
10
15StreamCache* stream_cache_alloc(void);
16
21void stream_cache_free(StreamCache* cache);
22
27void stream_cache_drop(StreamCache* cache);
28
34bool stream_cache_at_end(StreamCache* cache);
35
41size_t stream_cache_size(StreamCache* cache);
42
48size_t stream_cache_pos(StreamCache* cache);
49
56size_t stream_cache_fill(StreamCache* cache, Stream* stream);
57
64bool stream_cache_flush(StreamCache* cache, Stream* stream);
65
73size_t stream_cache_read(StreamCache* cache, uint8_t* data, size_t size);
74
82size_t stream_cache_write(StreamCache* cache, const uint8_t* data, size_t size);
83
90int32_t stream_cache_seek(StreamCache* cache, int32_t offset);
91
92#ifdef __cplusplus
93}
94#endif
Definition stream_cache.c:5
Definition stream_i.h:40