Documentation
¶
Overview ¶
Convert file-format signature sequences to something compatible with Siegfried's identifiers.
Index ¶
- Constants
- func ASCIIParser(signature string) string
- func GetPronomEncoding() string
- func GetPronomURIFromConfig()
- func HexParse(signature string) (string, error)
- func LookupEncoding(encoding string) int
- func PERLParser(signature string) (string, bool)
- func Parse(signature string, encoding int) (string, bool, int, error)
- func ReverseEncoding(encoding int) string
Constants ¶
const ( // UnknownEncoding provides us with a default to work with. UnknownEncoding = iota // HexEncoding describes magic numbers written in plain-hexadecimal. HexEncoding // PronomEncoding describe PRONOM based file format signatures. PronomEncoding // PerlEncoding describe PERL regular expression encoded signatures. PerlEncoding // ASCIIEncoding encoded patterns are those written entirely in plain ASCII. ASCIIEncoding // GUIDEncoding are globally unique identifiers. GUIDEncoding )
Encoding enumeration to return unambiguous values for encoding from the mapping lookup below.
Variables ¶
This section is empty.
Functions ¶
func ASCIIParser ¶
ASCIIParser returns a hexadecimal representation of a signature written using ASCII encoding.
func GetPronomEncoding ¶ added in v1.9.2
func GetPronomEncoding() string
GetPronomEncoding returns the PRONOM encoding URI as is set locally in the package.
func GetPronomURIFromConfig ¶ added in v1.9.2
func GetPronomURIFromConfig()
GetPronomURIFromConfig will read the current value of the PRONOM property from the configuration, e.g. after being updated using a custom SPARQL query.
func LookupEncoding ¶
LookupEncoding will return a best-guess encoding type for a supplied encoding string.
func PERLParser ¶
PERLParser will take a very limited range of PERL syntax and convert it to something PRONOM compatible.
func Parse ¶
Parse will take a signature and convert it into something that can be used. If the signature needs to be converted then the function will inform the caller and return the new encoding value.
func ReverseEncoding ¶
ReverseEncoding can provide a human readable string for us if we ever need it, e.g. if we need to debug this module.
Types ¶
This section is empty.