gzdoom/libraries/lzma/C/7zBuf.h

36 lines
634 B
C
Raw Normal View History

2016-03-01 15:47:10 +00:00
/* 7zBuf.h -- Byte Buffer
2023-03-04 : Igor Pavlov : Public domain */
2016-03-01 15:47:10 +00:00
#ifndef ZIP7_INC_7Z_BUF_H
#define ZIP7_INC_7Z_BUF_H
2016-03-01 15:47:10 +00:00
#include "7zTypes.h"
EXTERN_C_BEGIN
typedef struct
{
Byte *data;
size_t size;
} CBuf;
void Buf_Init(CBuf *p);
2018-01-08 12:00:01 +00:00
int Buf_Create(CBuf *p, size_t size, ISzAllocPtr alloc);
void Buf_Free(CBuf *p, ISzAllocPtr alloc);
2016-03-01 15:47:10 +00:00
typedef struct
{
Byte *data;
size_t size;
size_t pos;
} CDynBuf;
void DynBuf_Construct(CDynBuf *p);
void DynBuf_SeekToBeg(CDynBuf *p);
2018-01-08 12:00:01 +00:00
int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAllocPtr alloc);
void DynBuf_Free(CDynBuf *p, ISzAllocPtr alloc);
2016-03-01 15:47:10 +00:00
EXTERN_C_END
#endif