view src/win32/7zip/7z/C/BwtSort.h @ 1:f9f4f1b99eed

importing src directory
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:27 -0600
parents
children
line wrap: on
line source
1 /* BwtSort.h -- BWT block sorting
2 2008-03-26
3 Igor Pavlov
4 Public domain */
6 #ifndef __BWTSORT_H
7 #define __BWTSORT_H
9 #include "Types.h"
11 /* use BLOCK_SORT_EXTERNAL_FLAGS if blockSize can be > 1M */
12 /* #define BLOCK_SORT_EXTERNAL_FLAGS */
14 #ifdef BLOCK_SORT_EXTERNAL_FLAGS
15 #define BLOCK_SORT_EXTERNAL_SIZE(blockSize) ((((blockSize) + 31) >> 5))
16 #else
17 #define BLOCK_SORT_EXTERNAL_SIZE(blockSize) 0
18 #endif
20 #define BLOCK_SORT_BUF_SIZE(blockSize) ((blockSize) * 2 + BLOCK_SORT_EXTERNAL_SIZE(blockSize) + (1 << 16))
22 UInt32 BlockSort(UInt32 *indices, const Byte *data, UInt32 blockSize);
24 #endif