git_blob_is_binary

Determine if the blob content is most certainly binary or not.

The heuristic used to guess if a file is binary is taken from core git: Searching for NUL bytes and looking for a reasonable ratio of printable to non-printable characters among the first 8000 bytes.

extern (C) nothrow @nogc
int
git_blob_is_binary

Parameters

blob const(libgit2_d.types.git_blob)*

The blob which content should be analyzed

Return Value

Type: int

1 if the content of the blob is detected as binary; 0 otherwise.

Meta