Libraryless. Click here for Pure Java version (4728L/26K).
1 | scope isNonEmptySingleZip_byMagicHeader. |
2 | |
3 | static byte[] header = bytesFromHex("504B0304"); |
4 | |
5 | static bool isNonEmptySingleZip_byMagicHeader(byte[] data) { |
6 | ret byteArrayStartsWith(data, header); |
7 | } |
8 | |
9 | static bool isNonEmptySingleZip_byMagicHeader(File f) { |
10 | ret isNonEmptySingleZip_byMagicHeader(loadBeginningOfBinaryFile(f, l(header))); |
11 | } |
Began life as a copy of #1009031
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033454 |
Snippet name: | isNonEmptySingleZip_byMagicHeader |
Eternal ID of this version: | #1033454/1 |
Text MD5: | 910fc614fcee9f00c2453e0861a0e4ef |
Transpilation MD5: | 41aad1900005e94087013788892d342e |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-28 18:36:59 |
Source code size: | 346 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 167 / 234 |
Referenced in: | [show references] |