RTEMS  5.1
Files | Data Structures | Macros | Functions
Untar Image

Files

file  untar.c
 Untar an Image.
 

Data Structures

struct  Untar_HeaderContext
 
struct  Untar_ChunkContext
 
struct  Untar_GzChunkContext
 
struct  Untar_XzChunkContext
 

Macros

#define UNTAR_SUCCESSFUL   0
 
#define UNTAR_FAIL   1
 
#define UNTAR_INVALID_CHECKSUM   2
 
#define UNTAR_INVALID_HEADER   3
 
#define UNTAR_GZ_INFLATE_FAILED   4
 
#define UNTAR_GZ_INFLATE_END_FAILED   5
 
#define UNTAR_FILE_NAME_SIZE   100
 

Functions

int Untar_FromMemory (void *tar_buf, size_t size)
 
int Untar_FromMemory_Print (void *tar_buf, size_t size, const rtems_printer *printer)
 
int Untar_FromFile (const char *tar_name)
 
int Untar_FromFile_Print (const char *tar_name, const rtems_printer *printer)
 
void Untar_ChunkContext_Init (Untar_ChunkContext *context)
 Initializes the Untar_ChunkContext files out of a part of a block of memory. More...
 
int Untar_FromChunk_Print (Untar_ChunkContext *context, void *chunk, size_t chunk_size, const rtems_printer *printer)
 
int Untar_GzChunkContext_Init (Untar_GzChunkContext *ctx, void *inflateBuffer, size_t inflateBufferSize)
 Initializes the Untar_ChunkGzContext. More...
 
int Untar_FromGzChunk_Print (Untar_GzChunkContext *ctx, void *chunk, size_t chunk_size, const rtems_printer *printer)
 
int Untar_XzChunkContext_Init (Untar_XzChunkContext *ctx, enum xz_mode mode, uint32_t dict_max, void *inflateBuffer, size_t inflateBufferSize)
 Initializes the Untar_ChunkXzContext. More...
 
int Untar_FromXzChunk_Print (Untar_XzChunkContext *ctx, const void *chunk, size_t chunk_size, const rtems_printer *printer)
 
int Untar_ProcessHeader (Untar_HeaderContext *ctx, const char *bufr)
 

Detailed Description

Function Documentation

◆ Untar_ChunkContext_Init()

void Untar_ChunkContext_Init ( Untar_ChunkContext context)

Initializes the Untar_ChunkContext files out of a part of a block of memory.

Parameters
Untar_ChunkContext*context [in] Pointer to a context structure.

◆ Untar_GzChunkContext_Init()

int Untar_GzChunkContext_Init ( Untar_GzChunkContext ctx,
void *  inflateBuffer,
size_t  inflateBufferSize 
)

Initializes the Untar_ChunkGzContext.

Parameters
Untar_ChunkGzContext*context [in] Pointer to a context structure.
void*inflateBuffer [in] Pointer to a context structure.
size_tinflateBufferSize [in] Size of inflateBuffer.

◆ Untar_XzChunkContext_Init()

int Untar_XzChunkContext_Init ( Untar_XzChunkContext ctx,
enum xz_mode  mode,
uint32_t  dict_max,
void *  inflateBuffer,
size_t  inflateBufferSize 
)

Initializes the Untar_ChunkXzContext.

Parameters
Untar_ChunkXzContext*context [in] Pointer to a context structure.
enumxz_mode mode [in] Dictionary mode.
uint32_tdict_max [in] Maximum size of dictionary.
void*inflateBuffer [in] Pointer to a context structure.
size_tinflateBufferSize [in] Size of inflateBuffer.