Documentation
¶
Index ¶
- func Data(data []byte) bool
- func DataAccurate(data []byte) bool
- func DataAccurateAndUTF16(data []byte) (bool, bool)
- func DataAndUTF16(data []byte) (bool, bool)
- func File(filename string) (bool, error)
- func FileAccurate(filename string) (bool, error)
- func FileAccurateAndUTF16(filename string) (bool, bool, error)
- func FileAndUTF16(filename string) (bool, bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Data ¶ added in v1.3.0
Data tries to determine if the given data is binary by examining the first, last and middle 24 bytes, then using the probablyBinaryData function on each of them in turn.
func DataAccurate ¶ added in v1.4.0
DataAccurate determines if the given data is binary using thorough analysis. Unlike Data, this reads more of the input and uses magic number detection.
func DataAccurateAndUTF16 ¶ added in v1.4.0
DataAccurateAndUTF16 determines if the given data is binary using thorough analysis. Also returns whether the data appears to be UTF-16 encoded.
func DataAndUTF16 ¶ added in v1.3.3
DataAndUTF16 tries to determine if the given data is binary by examining the first, last and middle 24 bytes, then using the probablyBinaryData function on each of them in turn. Also returns a bool if the data appears to be UTF-16.
func File ¶ added in v1.3.0
File tries to determine if the given filename is a binary file by reading the first, last and middle 24 bytes, then using the probablyBinaryData function on each of them in turn.
func FileAccurate ¶ added in v1.4.0
FileAccurate determines if the given file is binary using thorough analysis. Unlike File, this reads more of the file and uses magic number detection.
func FileAccurateAndUTF16 ¶ added in v1.4.0
FileAccurateAndUTF16 determines if the given file is binary using thorough analysis. Also returns whether the file appears to be UTF-16 encoded.
func FileAndUTF16 ¶ added in v1.3.3
FileAndUTF16 tries to determine if the given filename is a binary file by reading the first, last and middle 24 bytes, then using the probablyBinaryData function on each of them in turn. Also return true if it is probably UTF-16.
Types ¶
This section is empty.