mirror of
https://github.com/aaru-dps/Aaru.Compression.Native.git
synced 2025-12-16 19:24:31 +00:00
Namespace exported symbols.
This commit is contained in:
2
adc.c
2
adc.c
@@ -37,7 +37,7 @@ FORCE_INLINE int GetOffset(uint8_t chunk[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AARU_EXPORT int32_t AARU_CALL adc_decode_buffer(uint8_t* dst_buffer,
|
AARU_EXPORT int32_t AARU_CALL AARU_adc_decode_buffer(uint8_t* dst_buffer,
|
||||||
int32_t dst_size,
|
int32_t dst_size,
|
||||||
const uint8_t* src_buffer,
|
const uint8_t* src_buffer,
|
||||||
int32_t src_size)
|
int32_t src_size)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#include "library.h"
|
#include "library.h"
|
||||||
#include "apple_rle.h"
|
#include "apple_rle.h"
|
||||||
|
|
||||||
AARU_EXPORT int32_t AARU_CALL apple_rle_decode_buffer(uint8_t* dst_buffer,
|
AARU_EXPORT int32_t AARU_CALL AARU_apple_rle_decode_buffer(uint8_t* dst_buffer,
|
||||||
int32_t dst_size,
|
int32_t dst_size,
|
||||||
const uint8_t* src_buffer,
|
const uint8_t* src_buffer,
|
||||||
int32_t src_size)
|
int32_t src_size)
|
||||||
|
|||||||
4
flac.c
4
flac.c
@@ -21,7 +21,7 @@ static FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder*
|
|||||||
static void
|
static void
|
||||||
error_callback(const FLAC__StreamDecoder* decoder, FLAC__StreamDecoderErrorStatus status, void* client_data);
|
error_callback(const FLAC__StreamDecoder* decoder, FLAC__StreamDecoderErrorStatus status, void* client_data);
|
||||||
|
|
||||||
AARU_EXPORT size_t AARU_CALL flac_decode_redbook_buffer(uint8_t* dst_buffer,
|
AARU_EXPORT size_t AARU_CALL AARU_flac_decode_redbook_buffer(uint8_t* dst_buffer,
|
||||||
size_t dst_size,
|
size_t dst_size,
|
||||||
const uint8_t* src_buffer,
|
const uint8_t* src_buffer,
|
||||||
size_t src_size)
|
size_t src_size)
|
||||||
@@ -135,7 +135,7 @@ static FLAC__StreamEncoderWriteStatus encoder_write_callback(const FLAC__StreamE
|
|||||||
uint32_t current_frame,
|
uint32_t current_frame,
|
||||||
void* client_data);
|
void* client_data);
|
||||||
|
|
||||||
AARU_EXPORT size_t AARU_CALL flac_encode_redbook_buffer(uint8_t* dst_buffer,
|
AARU_EXPORT size_t AARU_CALL AARU_flac_encode_redbook_buffer(uint8_t* dst_buffer,
|
||||||
size_t dst_size,
|
size_t dst_size,
|
||||||
const uint8_t* src_buffer,
|
const uint8_t* src_buffer,
|
||||||
size_t src_size,
|
size_t src_size,
|
||||||
|
|||||||
12
library.h
12
library.h
@@ -54,22 +54,22 @@
|
|||||||
#define FORCE_INLINE static inline __attribute__((always_inline))
|
#define FORCE_INLINE static inline __attribute__((always_inline))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
AARU_EXPORT int32_t AARU_CALL adc_decode_buffer(uint8_t* dst_buffer,
|
AARU_EXPORT int32_t AARU_CALL AARU_adc_decode_buffer(uint8_t* dst_buffer,
|
||||||
int32_t dst_size,
|
int32_t dst_size,
|
||||||
const uint8_t* src_buffer,
|
const uint8_t* src_buffer,
|
||||||
int32_t src_size);
|
int32_t src_size);
|
||||||
|
|
||||||
AARU_EXPORT int32_t AARU_CALL apple_rle_decode_buffer(uint8_t* dst_buffer,
|
AARU_EXPORT int32_t AARU_CALL AARU_apple_rle_decode_buffer(uint8_t* dst_buffer,
|
||||||
int32_t dst_size,
|
int32_t dst_size,
|
||||||
const uint8_t* src_buffer,
|
const uint8_t* src_buffer,
|
||||||
int32_t src_size);
|
int32_t src_size);
|
||||||
|
|
||||||
AARU_EXPORT size_t AARU_CALL flac_decode_redbook_buffer(uint8_t* dst_buffer,
|
AARU_EXPORT size_t AARU_CALL AARU_flac_decode_redbook_buffer(uint8_t* dst_buffer,
|
||||||
size_t dst_size,
|
size_t dst_size,
|
||||||
const uint8_t* src_buffer,
|
const uint8_t* src_buffer,
|
||||||
size_t src_size);
|
size_t src_size);
|
||||||
|
|
||||||
AARU_EXPORT size_t AARU_CALL flac_encode_redbook_buffer(uint8_t* dst_buffer,
|
AARU_EXPORT size_t AARU_CALL AARU_flac_encode_redbook_buffer(uint8_t* dst_buffer,
|
||||||
size_t dst_size,
|
size_t dst_size,
|
||||||
const uint8_t* src_buffer,
|
const uint8_t* src_buffer,
|
||||||
size_t src_size,
|
size_t src_size,
|
||||||
@@ -85,12 +85,12 @@ AARU_EXPORT size_t AARU_CALL flac_encode_redbook_buffer(uint8_t* dst_buffe
|
|||||||
const char* application_id,
|
const char* application_id,
|
||||||
uint32_t application_id_len);
|
uint32_t application_id_len);
|
||||||
|
|
||||||
AARU_EXPORT int32_t AARU_CALL lzip_decode_buffer(uint8_t* dst_buffer,
|
AARU_EXPORT int32_t AARU_CALL AARU_lzip_decode_buffer(uint8_t* dst_buffer,
|
||||||
int32_t dst_size,
|
int32_t dst_size,
|
||||||
const uint8_t* src_buffer,
|
const uint8_t* src_buffer,
|
||||||
int32_t src_size);
|
int32_t src_size);
|
||||||
|
|
||||||
AARU_EXPORT int32_t AARU_CALL lzip_encode_buffer(uint8_t* dst_buffer,
|
AARU_EXPORT int32_t AARU_CALL AARU_lzip_encode_buffer(uint8_t* dst_buffer,
|
||||||
int32_t dst_size,
|
int32_t dst_size,
|
||||||
const uint8_t* src_buffer,
|
const uint8_t* src_buffer,
|
||||||
int32_t src_size,
|
int32_t src_size,
|
||||||
|
|||||||
4
lzip.c
4
lzip.c
@@ -23,7 +23,7 @@
|
|||||||
#include "library.h"
|
#include "library.h"
|
||||||
#include "3rdparty/lzlib-1.12/lzlib.h"
|
#include "3rdparty/lzlib-1.12/lzlib.h"
|
||||||
|
|
||||||
AARU_EXPORT int32_t AARU_CALL lzip_decode_buffer(uint8_t* dst_buffer,
|
AARU_EXPORT int32_t AARU_CALL AARU_lzip_decode_buffer(uint8_t* dst_buffer,
|
||||||
int32_t dst_size,
|
int32_t dst_size,
|
||||||
const uint8_t* src_buffer,
|
const uint8_t* src_buffer,
|
||||||
int32_t src_size)
|
int32_t src_size)
|
||||||
@@ -83,7 +83,7 @@ AARU_EXPORT int32_t AARU_CALL lzip_decode_buffer(uint8_t* dst_buffer,
|
|||||||
return out_pos;
|
return out_pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
AARU_EXPORT int32_t AARU_CALL lzip_encode_buffer(uint8_t* dst_buffer,
|
AARU_EXPORT int32_t AARU_CALL AARU_lzip_encode_buffer(uint8_t* dst_buffer,
|
||||||
int32_t dst_size,
|
int32_t dst_size,
|
||||||
const uint8_t* src_buffer,
|
const uint8_t* src_buffer,
|
||||||
int32_t src_size,
|
int32_t src_size,
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#include "../library.h"
|
|
||||||
#include "../adc.h"
|
#include "../adc.h"
|
||||||
|
#include "../library.h"
|
||||||
#include "crc32.h"
|
#include "crc32.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ TEST_F(adcFixture, adc)
|
|||||||
{
|
{
|
||||||
auto* outBuf = (uint8_t*)malloc(327680);
|
auto* outBuf = (uint8_t*)malloc(327680);
|
||||||
|
|
||||||
auto decoded = adc_decode_buffer(outBuf, 327680, buffer, 34367);
|
auto decoded = AARU_adc_decode_buffer(outBuf, 327680, buffer, 34367);
|
||||||
|
|
||||||
EXPECT_EQ(decoded, 262144);
|
EXPECT_EQ(decoded, 262144);
|
||||||
|
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#include "../library.h"
|
|
||||||
#include "../apple_rle.h"
|
#include "../apple_rle.h"
|
||||||
|
#include "../library.h"
|
||||||
#include "crc32.h"
|
#include "crc32.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
@@ -53,9 +53,7 @@ class apple_rleFixture : public ::testing::Test
|
|||||||
fclose(file);
|
fclose(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TearDown() {
|
void TearDown() { free((void*)buffer); }
|
||||||
free((void*)buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
~apple_rleFixture()
|
~apple_rleFixture()
|
||||||
{
|
{
|
||||||
@@ -67,9 +65,9 @@ class apple_rleFixture : public ::testing::Test
|
|||||||
|
|
||||||
TEST_F(apple_rleFixture, apple_rle)
|
TEST_F(apple_rleFixture, apple_rle)
|
||||||
{
|
{
|
||||||
auto *outBuf = (uint8_t*)malloc(32768);
|
auto* outBuf = (uint8_t*)malloc(32768);
|
||||||
|
|
||||||
auto decoded = apple_rle_decode_buffer(outBuf, 32768, buffer, 1102);
|
auto decoded = AARU_apple_rle_decode_buffer(outBuf, 32768, buffer, 1102);
|
||||||
|
|
||||||
EXPECT_EQ(decoded, 20960);
|
EXPECT_EQ(decoded, 20960);
|
||||||
|
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include "../library.h"
|
|
||||||
#include "../flac.h"
|
#include "../flac.h"
|
||||||
|
#include "../library.h"
|
||||||
#include "crc32.h"
|
#include "crc32.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ TEST_F(flacFixture, flac)
|
|||||||
{
|
{
|
||||||
auto* outBuf = (uint8_t*)malloc(9633792);
|
auto* outBuf = (uint8_t*)malloc(9633792);
|
||||||
|
|
||||||
auto decoded = flac_decode_redbook_buffer(outBuf, 9633792, buffer, 6534197);
|
auto decoded = AARU_flac_decode_redbook_buffer(outBuf, 9633792, buffer, 6534197);
|
||||||
|
|
||||||
EXPECT_EQ(decoded, 9633792);
|
EXPECT_EQ(decoded, 9633792);
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ TEST_F(flacFixture, flacCompress)
|
|||||||
original_crc = crc32_data(original, original_len);
|
original_crc = crc32_data(original, original_len);
|
||||||
|
|
||||||
// Compress
|
// Compress
|
||||||
newSize = flac_encode_redbook_buffer(cmp_buffer,
|
newSize = AARU_flac_encode_redbook_buffer(cmp_buffer,
|
||||||
cmp_len,
|
cmp_len,
|
||||||
original,
|
original,
|
||||||
original_len,
|
original_len,
|
||||||
@@ -127,7 +127,7 @@ TEST_F(flacFixture, flacCompress)
|
|||||||
cmp_len = newSize;
|
cmp_len = newSize;
|
||||||
|
|
||||||
// Decompress
|
// Decompress
|
||||||
newSize = flac_decode_redbook_buffer(decmp_buffer, decmp_len, cmp_buffer, cmp_len);
|
newSize = AARU_flac_decode_redbook_buffer(decmp_buffer, decmp_len, cmp_buffer, cmp_len);
|
||||||
decmp_len = newSize;
|
decmp_len = newSize;
|
||||||
|
|
||||||
EXPECT_EQ(decmp_len, original_len);
|
EXPECT_EQ(decmp_len, original_len);
|
||||||
|
|||||||
@@ -17,10 +17,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <climits>
|
#include <climits>
|
||||||
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include "../library.h"
|
#include "../library.h"
|
||||||
#include "../lzip.h"
|
|
||||||
#include "crc32.h"
|
#include "crc32.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ TEST_F(lzipFixture, lzip)
|
|||||||
{
|
{
|
||||||
auto* outBuf = (uint8_t*)malloc(1048576);
|
auto* outBuf = (uint8_t*)malloc(1048576);
|
||||||
|
|
||||||
auto decoded = lzip_decode_buffer(outBuf, 1048576, buffer, 1062874);
|
auto decoded = AARU_lzip_decode_buffer(outBuf, 1048576, buffer, 1062874);
|
||||||
|
|
||||||
EXPECT_EQ(decoded, 1048576);
|
EXPECT_EQ(decoded, 1048576);
|
||||||
|
|
||||||
@@ -108,11 +108,11 @@ TEST_F(lzipFixture, lzipCompress)
|
|||||||
original_crc = crc32_data(original, original_len);
|
original_crc = crc32_data(original, original_len);
|
||||||
|
|
||||||
// Compress
|
// Compress
|
||||||
newSize = lzip_encode_buffer(cmp_buffer, cmp_len, original, original_len, 1048576, 273);
|
newSize = AARU_lzip_encode_buffer(cmp_buffer, cmp_len, original, original_len, 1048576, 273);
|
||||||
cmp_len = newSize;
|
cmp_len = newSize;
|
||||||
|
|
||||||
// Decompress
|
// Decompress
|
||||||
newSize = lzip_decode_buffer(decmp_buffer, decmp_len, cmp_buffer, cmp_len);
|
newSize = AARU_lzip_decode_buffer(decmp_buffer, decmp_len, cmp_buffer, cmp_len);
|
||||||
decmp_len = newSize;
|
decmp_len = newSize;
|
||||||
|
|
||||||
EXPECT_EQ(decmp_len, original_len);
|
EXPECT_EQ(decmp_len, original_len);
|
||||||
|
|||||||
Reference in New Issue
Block a user