0
0
Fork 0
mirror of https://github.com/ZDoom/qzdoom.git synced 2024-12-16 07:21:28 +00:00
qzdoom/lzma/C/7zBuf.h
Randy Heit 7e7429e3d2 - Added support for 7z archives.
SVN r1545 (trunk)
2009-04-15 03:58:10 +00:00

31 lines
611 B
C

/* 7zBuf.h -- Byte Buffer
2008-10-04 : Igor Pavlov : Public domain */
#ifndef __7Z_BUF_H
#define __7Z_BUF_H
#include "Types.h"
typedef struct
{
Byte *data;
size_t size;
} CBuf;
void Buf_Init(CBuf *p);
int Buf_Create(CBuf *p, size_t size, ISzAlloc *alloc);
void Buf_Free(CBuf *p, ISzAlloc *alloc);
typedef struct
{
Byte *data;
size_t size;
size_t pos;
} CDynBuf;
void DynBuf_Construct(CDynBuf *p);
void DynBuf_SeekToBeg(CDynBuf *p);
int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAlloc *alloc);
void DynBuf_Free(CDynBuf *p, ISzAlloc *alloc);
#endif