Subversion Repositories spk

Rev

Details | Last modification | View Log | RSS feed

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