Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Compress/BWT/BlockSort.h')
-rwxr-xr-xCPP/7zip/Compress/BWT/BlockSort.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/CPP/7zip/Compress/BWT/BlockSort.h b/CPP/7zip/Compress/BWT/BlockSort.h
new file mode 100755
index 00000000..def48a96
--- /dev/null
+++ b/CPP/7zip/Compress/BWT/BlockSort.h
@@ -0,0 +1,21 @@
+// BlockSort.h
+
+#ifndef __BLOCKSORT_H
+#define __BLOCKSORT_H
+
+#include "Common/Types.h"
+
+// 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);
+
+#endif