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

11
LINES

< > BotCompany Repo | #1035940 // isQOI - tests using magic bytes

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

Libraryless. Click here for Pure Java version (9243L/51K).

scope isQOI.

static byte[] #magic = toASCII("qoif");

sbool isQOI(byte[] data) {
  ret byteArrayStartsWith(data, magic);
}

sbool isQOI(File f) {
  ret isQOI(loadBeginningOfBinaryFile(f, l(magic)));
}

Author comment

Began life as a copy of #1009031

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035940
Snippet name: isQOI - tests using magic bytes
Eternal ID of this version: #1035940/1
Text MD5: 39855c4b45bbaf39aa21e7a60c6658e7
Transpilation MD5: 3af3c4c38216fe9acdadd9b24b805c61
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-08-15 20:50:44
Source code size: 211 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 58 / 77
Referenced in: [show references]