// Check if compressed data size exceeds 1KB * pageCount
if(compressedData.length>1024*pageCount){
if(compressedData.length-compression_size>1024){
System.out.println("Previous compressed data size: "+compression_size+" bytes. Current compressed data size: "+compressedData.length+" bytes. Delta:"+(compressedData.length-compression_size)+" bytes.");
System.out.println("Size limit exceeded. Reverting to previous chunk.");
sizeLimitExceeded=true;
wordUsage=previousWordUsageState;// Revert to the previous state of the trie
uncompressedData=previousUncompressedData;// Revert to the previous uncompressed data
compressedData=compress(uncompressedData);// Recompress the reverted state
break;// Stop processing further chunks
@@ -163,9 +142,11 @@ public class crawler {
}
// Save the uncompressed and compressed data to separate files