"Fossies" - the Fresh Open Source Software Archive

Member "clamav-0.102.3/libclamav/7z/7zBuf.h" (12 May 2020, 649 Bytes) of package /linux/misc/clamav-0.102.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "7zBuf.h" see the Fossies "Dox" file reference documentation.

    1 /* 7zBuf.h -- Byte Buffer
    2 2009-02-07 : Igor Pavlov : Public domain */
    3 
    4 #ifndef __7Z_BUF_H
    5 #define __7Z_BUF_H
    6 
    7 #include "Types.h"
    8 
    9 #ifdef __cplusplus
   10 extern "C" {
   11 #endif
   12 
   13 typedef struct
   14 {
   15   Byte *data;
   16   size_t size;
   17 } CBuf;
   18 
   19 void Buf_Init(CBuf *p);
   20 int Buf_Create(CBuf *p, size_t size, ISzAlloc *alloc);
   21 void Buf_Free(CBuf *p, ISzAlloc *alloc);
   22 
   23 typedef struct
   24 {
   25   Byte *data;
   26   size_t size;
   27   size_t pos;
   28 } CDynBuf;
   29 
   30 void DynBuf_Construct(CDynBuf *p);
   31 void DynBuf_SeekToBeg(CDynBuf *p);
   32 int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAlloc *alloc);
   33 void DynBuf_Free(CDynBuf *p, ISzAlloc *alloc);
   34 
   35 #ifdef __cplusplus
   36 }
   37 #endif
   38 
   39 #endif