Skip to content

Commit 7efcb19

Browse files
style: remove unused code
1 parent e18301c commit 7efcb19

1 file changed

Lines changed: 2 additions & 19 deletions

File tree

h2/src/main/org/h2/tools/CompressTool.java

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -82,23 +82,6 @@ public static InputStream createBZip2InputStream(InputStream inputStream) {
8282
}
8383
}
8484

85-
public static int determineBlockSize() {
86-
long freeMemory = Runtime.getRuntime().freeMemory() / 2;
87-
long blockSize = 1L * 1024 * 1024; // start with 1MB
88-
long maxBlockSize = 1024L * 1024 * 1024; // 1GB
89-
90-
// Increase block size while quadrupling each step (1MB -> 4MB -> 8MB -> ...)
91-
while (blockSize < maxBlockSize && blockSize * 4 <= freeMemory) {
92-
blockSize *= 2; // doubling per step (1, 2, 4, 8, 16, etc.)
93-
if (blockSize >= 4 * 1024 * 1024) {
94-
// Adjust to the pattern: 1MB, 4MB, then doubling
95-
blockSize *= 2;
96-
}
97-
}
98-
99-
return (int) blockSize;
100-
}
101-
10285
/**
10386
* Creates a Kanzi compressing output stream using reflection.
10487
*/
@@ -116,9 +99,9 @@ public static OutputStream createKanziOutputStream(OutputStream baseOutputStream
11699
// 85411430 kanzi -x64 -b 256m -t TEXT+RLT+LZP+PACK -e TPAQX
117100
// 85397152 kanzi -x64 -b 256m -t TEXT+RLT+LZP+PACK+RLT -e TPAQX
118101

119-
configMap.put("transform", "TEXT+RLT+LZP+PACK+RLT");// Good for text
102+
configMap.put("transform", "TEXT+RLT+LZP+PACK+RLT");// Good for SQL dump
120103
configMap.put("entropy", "TPAQ"); // Text and structured data
121-
configMap.put("blockSize", 64 * 1024 * 1024); // 128MB blocks
104+
configMap.put("blockSize", 64 * 1024 * 1024); // 64MB blocks
122105
configMap.put("level", 9); // Max. compression level
123106
configMap.put("checksum", 64); // Enable checksums
124107

0 commit comments

Comments
 (0)