all repos — mgba @ b2d406a411b31acce5bbf0246af32a80c22ca834

mGBA Game Boy Advance Emulator

src/third-party/lzma/7zBuf.h (view raw)

 1/* 7zBuf.h -- Byte Buffer
 22017-04-03 : Igor Pavlov : Public domain */
 3
 4#ifndef __7Z_BUF_H
 5#define __7Z_BUF_H
 6
 7#include "7zTypes.h"
 8
 9EXTERN_C_BEGIN
10
11typedef struct
12{
13  Byte *data;
14  size_t size;
15} CBuf;
16
17void Buf_Init(CBuf *p);
18int Buf_Create(CBuf *p, size_t size, ISzAllocPtr alloc);
19void Buf_Free(CBuf *p, ISzAllocPtr alloc);
20
21typedef struct
22{
23  Byte *data;
24  size_t size;
25  size_t pos;
26} CDynBuf;
27
28void DynBuf_Construct(CDynBuf *p);
29void DynBuf_SeekToBeg(CDynBuf *p);
30int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAllocPtr alloc);
31void DynBuf_Free(CDynBuf *p, ISzAllocPtr alloc);
32
33EXTERN_C_END
34
35#endif