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

7
LINES

< > BotCompany Repo | #1030581 // diffZipFiles - may not detect changes in the (very) rare case of a content change without a CRC change

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

Libraryless. Click here for Pure Java version (3085L/18K).

1  
// diff key: path, diff value: crc (or null if not existent)
2  
static L<KeyValueDiff<S, Long>> diffZipFiles(File zip1, File zip2) {
3  
  new L<KeyValueDiff<S, Long>> diffs;
4  
  Map<S, Long> files1 = listZipAsNameToCRCMap(zip1);
5  
  Map<S, Long> files2 = listZipAsNameToCRCMap(zip2);
6  
  ret sorted(mapsToKeyValueDiffs(files1, files2));
7  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030581
Snippet name: diffZipFiles - may not detect changes in the (very) rare case of a content change without a CRC change
Eternal ID of this version: #1030581/4
Text MD5: 6827ce2bd27c0339604b2241b3c77f6d
Transpilation MD5: 5bf401a70dd3ae80d4aec075cab7d7bb
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-01-13 18:30:45
Source code size: 332 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 288 / 400
Version history: 3 change(s)
Referenced in: [show references]