module

Crowbar::Detector

Automatic format and protocol detector inspecting magic bytes, framing signatures, and syntactical prefixes across media, network protocols, structured data, and code.

Class methods

detect(buffer : Buffer) : Symbol | Nil

Inspects buffer contents and returns the best-matching format symbol, or nil if undetermined.

Source