-
-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add NanaZipCodecsLz4Read, NanaZipCodecsLz4Write, NanaZipCodecsLz5Read…
… and NanaZipCodecsLz5Write.
- Loading branch information
1 parent
28c10da
commit ecfd73d
Showing
13 changed files
with
204 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* PROJECT: NanaZip | ||
* FILE: NanaZip.Codecs.MultiThreadWrapper.LZ4.cpp | ||
* PURPOSE: Implementation for LZ4 Multi Thread Wrapper | ||
* | ||
* LICENSE: The MIT License | ||
* | ||
* MAINTAINER: MouriNaruto (Kenji.Mouri@outlook.com) | ||
*/ | ||
|
||
#include "NanaZip.Codecs.MultiThreadWrapper.LZ4.h" | ||
|
||
EXTERN_C int NanaZipCodecsLz4Read( | ||
void* Context, | ||
LZ4MT_Buffer* Input) | ||
{ | ||
NANAZIP_CODECS_ZSTDMT_BUFFER_CONTEXT ConvertedInput; | ||
ConvertedInput.Buffer = Input->buf; | ||
ConvertedInput.Size = Input->size; | ||
ConvertedInput.Allocated = Input->allocated; | ||
return ::NanaZipCodecsCommonRead( | ||
reinterpret_cast<PNANAZIP_CODECS_ZSTDMT_STREAM_CONTEXT>(Context), | ||
&ConvertedInput); | ||
} | ||
|
||
EXTERN_C int NanaZipCodecsLz4Write( | ||
void* Context, | ||
LZ4MT_Buffer* Output) | ||
{ | ||
NANAZIP_CODECS_ZSTDMT_BUFFER_CONTEXT ConvertedOutput; | ||
ConvertedOutput.Buffer = Output->buf; | ||
ConvertedOutput.Size = Output->size; | ||
ConvertedOutput.Allocated = Output->allocated; | ||
return ::NanaZipCodecsCommonWrite( | ||
reinterpret_cast<PNANAZIP_CODECS_ZSTDMT_STREAM_CONTEXT>(Context), | ||
&ConvertedOutput); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* PROJECT: NanaZip | ||
* FILE: NanaZip.Codecs.MultiThreadWrapper.LZ4.h | ||
* PURPOSE: Definition for LZ4 Multi Thread Wrapper | ||
* | ||
* LICENSE: The MIT License | ||
* | ||
* MAINTAINER: MouriNaruto (Kenji.Mouri@outlook.com) | ||
*/ | ||
|
||
#ifndef NANAZIP_CODECS_MULTI_THREAD_WRAPPER_LZ4 | ||
#define NANAZIP_CODECS_MULTI_THREAD_WRAPPER_LZ4 | ||
|
||
#include "NanaZip.Codecs.MultiThreadWrapper.Common.h" | ||
|
||
#include <stdint.h> | ||
#include <lz4-mt.h> | ||
|
||
EXTERN_C int NanaZipCodecsLz4Read( | ||
void* Context, | ||
LZ4MT_Buffer* Input); | ||
|
||
EXTERN_C int NanaZipCodecsLz4Write( | ||
void* Context, | ||
LZ4MT_Buffer* Output); | ||
|
||
#endif // !NANAZIP_CODECS_MULTI_THREAD_WRAPPER_LZ4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* PROJECT: NanaZip | ||
* FILE: NanaZip.Codecs.MultiThreadWrapper.LZ5.cpp | ||
* PURPOSE: Implementation for LZ5 Multi Thread Wrapper | ||
* | ||
* LICENSE: The MIT License | ||
* | ||
* MAINTAINER: MouriNaruto (Kenji.Mouri@outlook.com) | ||
*/ | ||
|
||
#include "NanaZip.Codecs.MultiThreadWrapper.LZ5.h" | ||
|
||
EXTERN_C int NanaZipCodecsLz5Read( | ||
void* Context, | ||
LZ5MT_Buffer* Input) | ||
{ | ||
NANAZIP_CODECS_ZSTDMT_BUFFER_CONTEXT ConvertedInput; | ||
ConvertedInput.Buffer = Input->buf; | ||
ConvertedInput.Size = Input->size; | ||
ConvertedInput.Allocated = Input->allocated; | ||
return ::NanaZipCodecsCommonRead( | ||
reinterpret_cast<PNANAZIP_CODECS_ZSTDMT_STREAM_CONTEXT>(Context), | ||
&ConvertedInput); | ||
} | ||
|
||
EXTERN_C int NanaZipCodecsLz5Write( | ||
void* Context, | ||
LZ5MT_Buffer* Output) | ||
{ | ||
NANAZIP_CODECS_ZSTDMT_BUFFER_CONTEXT ConvertedOutput; | ||
ConvertedOutput.Buffer = Output->buf; | ||
ConvertedOutput.Size = Output->size; | ||
ConvertedOutput.Allocated = Output->allocated; | ||
return ::NanaZipCodecsCommonWrite( | ||
reinterpret_cast<PNANAZIP_CODECS_ZSTDMT_STREAM_CONTEXT>(Context), | ||
&ConvertedOutput); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* PROJECT: NanaZip | ||
* FILE: NanaZip.Codecs.MultiThreadWrapper.LZ5.h | ||
* PURPOSE: Definition for LZ5 Multi Thread Wrapper | ||
* | ||
* LICENSE: The MIT License | ||
* | ||
* MAINTAINER: MouriNaruto (Kenji.Mouri@outlook.com) | ||
*/ | ||
|
||
#ifndef NANAZIP_CODECS_MULTI_THREAD_WRAPPER_LZ5 | ||
#define NANAZIP_CODECS_MULTI_THREAD_WRAPPER_LZ5 | ||
|
||
#include "NanaZip.Codecs.MultiThreadWrapper.Common.h" | ||
|
||
#include <stdint.h> | ||
#include <lz5-mt.h> | ||
|
||
EXTERN_C int NanaZipCodecsLz5Read( | ||
void* Context, | ||
LZ5MT_Buffer* Input); | ||
|
||
EXTERN_C int NanaZipCodecsLz5Write( | ||
void* Context, | ||
LZ5MT_Buffer* Output); | ||
|
||
#endif // !NANAZIP_CODECS_MULTI_THREAD_WRAPPER_LZ5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.