11//! Core types and JSON schema for the strix string-extraction library.
22//!
3- //! The JSON output is designed to be compatible with `flare-floss`'s
4- //! `--json` output where it makes sense, so consumers can swap one for
5- //! the other.
6- //!
73//! Lifetimes here are deliberate: every string-bearing struct carries
84//! a `'a` so that extractors that scan the input file directly
95//! (static, language) can borrow `&str` slices into the input bytes
@@ -25,8 +21,8 @@ pub use traits::Extractor;
2521
2622/// The kind of string that was extracted.
2723///
28- /// This mirrors FLOSS's categories so the JSON output is intelligible to
29- /// existing FLOSS tooling .
24+ /// String categories cover both raw printable runs (static / language)
25+ /// and bytes produced at runtime by decoders (stack / tight / decoded) .
3026#[ derive( Debug , Clone , Copy , PartialEq , Eq , PartialOrd , Ord , Hash , Serialize , Deserialize ) ]
3127#[ serde( rename_all = "snake_case" ) ]
3228pub enum StringKind {
@@ -143,15 +139,15 @@ impl<'a> ExtractedString<'a> {
143139/// Options controlling extraction.
144140#[ derive( Debug , Clone ) ]
145141pub struct ExtractOptions {
146- /// Minimum string length (in characters) for static strings. FLOSS
147- /// default is 4.
142+ /// Minimum string length (in characters) for static strings.
143+ /// Default is 4, matching the convention of classic `strings(1)` .
148144 pub min_length : usize ,
149145 /// Which extractors to run. If `None`, run all available.
150146 pub enabled : Option < Vec < StringKind > > ,
151147 /// Override file format detection. `None` = auto-detect.
152148 pub format_override : Option < FormatHint > ,
153149 /// Hard upper bound on emulation work (per-function steps); applied
154- /// only by the emulation extractors. FLOSS default analog is ~20_000.
150+ /// only by the emulation extractors. Reasonable default ~20_000.
155151 pub max_emulation_steps : u64 ,
156152 /// If true, drop duplicate strings from the result (matching on
157153 /// value + kind + encoding). The first occurrence is kept with its
0 commit comments