From f19f813537c7aea1c20749c914e756b54a9c3cf5 Mon Sep 17 00:00:00 2001 From: Igor Pavlov <87184205+ip7z@users.noreply.github.com> Date: Mon, 27 Dec 2021 00:00:00 +0000 Subject: '21.07' --- C/BwtSort.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 C/BwtSort.h (limited to 'C/BwtSort.h') diff --git a/C/BwtSort.h b/C/BwtSort.h new file mode 100644 index 0000000..7e989a9 --- /dev/null +++ b/C/BwtSort.h @@ -0,0 +1,26 @@ +/* BwtSort.h -- BWT block sorting +2013-01-18 : Igor Pavlov : Public domain */ + +#ifndef __BWT_SORT_H +#define __BWT_SORT_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +/* use BLOCK_SORT_EXTERNAL_FLAGS if blockSize can be > 1M */ +/* #define BLOCK_SORT_EXTERNAL_FLAGS */ + +#ifdef BLOCK_SORT_EXTERNAL_FLAGS +#define BLOCK_SORT_EXTERNAL_SIZE(blockSize) ((((blockSize) + 31) >> 5)) +#else +#define BLOCK_SORT_EXTERNAL_SIZE(blockSize) 0 +#endif + +#define BLOCK_SORT_BUF_SIZE(blockSize) ((blockSize) * 2 + BLOCK_SORT_EXTERNAL_SIZE(blockSize) + (1 << 16)) + +UInt32 BlockSort(UInt32 *indices, const Byte *data, UInt32 blockSize); + +EXTERN_C_END + +#endif -- cgit v1.2.3-55-g6feb