mirror of
https://github.com/aaru-dps/Aaru.Compression.Native.git
synced 2025-12-16 19:24:31 +00:00
Implement HA's ASC and HSC algorithms.
This commit is contained in:
45
ha/internal.h
Normal file
45
ha/internal.h
Normal file
@@ -0,0 +1,45 @@
|
||||
|
||||
/***********************************************************************
|
||||
Modified to work with memory buffers instead of files by
|
||||
Copyright (C) 2005 Natalia Portillo
|
||||
************************************************************************/
|
||||
|
||||
#ifndef INTERNAL_H
|
||||
#define INTERNAL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
/* Type definitions matching original HA code */
|
||||
typedef int16_t S16B;
|
||||
typedef uint16_t U16B;
|
||||
typedef int32_t S32B;
|
||||
typedef uint32_t U32B;
|
||||
|
||||
/* Memory buffer management */
|
||||
typedef struct
|
||||
{
|
||||
const unsigned char *data;
|
||||
size_t size;
|
||||
size_t pos;
|
||||
int error;
|
||||
} input_buffer_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned char *data;
|
||||
size_t size;
|
||||
size_t pos;
|
||||
size_t max_size;
|
||||
int error;
|
||||
} output_buffer_t;
|
||||
|
||||
/* Decompression context */
|
||||
typedef struct
|
||||
{
|
||||
input_buffer_t input;
|
||||
output_buffer_t output;
|
||||
int algorithm;
|
||||
} decompress_context_t;
|
||||
|
||||
#endif /* INTERNAL_H */
|
||||
Reference in New Issue
Block a user