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

9
LINES

< > BotCompany Repo | #1015994 // isGIF

JavaX fragment (include)

static byte[] isGIF_magic = bytesFromHex("47494638"); // Actual signature is longer, but we're lazy

static bool isGIF(byte[] data) {
  ret byteArrayStartsWith(data, isGIF_magic);
}

static bool isGIF(File f) {
  ret isGIF(loadBeginningOfBinaryFile(f, l(isGIF_magic)));
}

Author comment

Began life as a copy of #1009031

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1015994
Snippet name: isGIF
Eternal ID of this version: #1015994/3
Text MD5: b6750b1cc3b131dd92b41bde82a3d889
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-02 20:32:11
Source code size: 279 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 474 / 496
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)