File: 7zBuf.h

package info (click to toggle)
7zip-rar 25.00%2Bds-1
  • links: PTS, VCS
  • area: non-free
  • in suites: trixie
  • size: 13,432 kB
  • sloc: cpp: 212,215; ansic: 39,747; asm: 4,987; makefile: 2,125
file content (35 lines) | stat: -rwxr-xr-x 669 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* 7zBuf.h -- Byte Buffer
2023-03-04 : Igor Pavlov : Public domain */

#ifndef ZIP7_INC_7Z_BUF_H
#define ZIP7_INC_7Z_BUF_H

#include "7zTypes.h"

EXTERN_C_BEGIN

typedef struct
{
  Byte *data;
  size_t size;
} CBuf;

void Buf_Init(CBuf *p);
int Buf_Create(CBuf *p, size_t size, ISzAllocPtr alloc);
void Buf_Free(CBuf *p, ISzAllocPtr 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, ISzAllocPtr alloc);
void DynBuf_Free(CDynBuf *p, ISzAllocPtr alloc);

EXTERN_C_END

#endif