mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-22 02:38:11 +00:00
26833c35c9
headers
40 lines
697 B
C
Executable File
40 lines
697 B
C
Executable File
/* 7zBuf.h -- Byte Buffer
|
|
2009-02-07 : Igor Pavlov : Public domain */
|
|
|
|
#ifndef __7Z_BUF_H
|
|
#define __7Z_BUF_H
|
|
|
|
#include "Types.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct
|
|
{
|
|
uint8_t *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
|
|
{
|
|
uint8_t *data;
|
|
size_t size;
|
|
size_t pos;
|
|
} CDynBuf;
|
|
|
|
void DynBuf_Construct(CDynBuf *p);
|
|
void DynBuf_SeekToBeg(CDynBuf *p);
|
|
int DynBuf_Write(CDynBuf *p, const uint8_t *buf, size_t size, ISzAlloc *alloc);
|
|
void DynBuf_Free(CDynBuf *p, ISzAlloc *alloc);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|