Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

24
LINES

< > BotCompany Repo | #1029474 // lcCompressFilePart

JavaX fragment (include) [tags: use-pretranspiled]

Uses 11335K of libraries. Click here for Pure Java version (8965L/58K).

1  
static File lcCompressFilePart(File file, File archiveFile, long startIndex, int length, O... _) {
2  
  optPar bool balancing = true;
3  
  optPar bool fullCompression;
4  
  optPar bool verbose;
5  
6  
  length = toInt(min(length, l(file)-startIndex));
7  
  print("Compressing " + file + " [" + startIndex + "/" + length + "]");
8  
  time "Compressed" {
9  
    new LineCompCompressor compressor;
10  
    compressor.byteMode = true;
11  
    compressor.fullCompression = fullCompression;
12  
    if (fullCompression) print("full compression");
13  
    print("byte mode");
14  
    compressor.verboseCompressionSteps = print(+verbose);
15  
    compressor.balancing = true;
16  
    if (compressor.balancing) print("balancing mode");
17  
    compressor.verify = false;
18  
    compressor.verboseStats = true;
19  
    compressor.loadTexts(litmap(str(startIndex), loadTextFilePart_rawBytes(file, startIndex, startIndex+length));
20  
    compressor.run();
21  
    lcSaveToFile(compressor, archiveFile);
22  
  }
23  
  ret printFileInfo(archiveFile);
24  
}

Author comment

Began life as a copy of #1029266

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1029474
Snippet name: lcCompressFilePart
Eternal ID of this version: #1029474/2
Text MD5: d548a6e752c741b74536ac14e7bec239
Transpilation MD5: 91a4b2204c0c42ee84d158eaa8cc1988
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-08-12 01:20:07
Source code size: 983 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 135 / 198
Version history: 1 change(s)
Referenced in: [show references]