class
Crowbar::Rules::ZipRule
- Crowbar::Rules::ZipRule
- Crowbar::Rule
- Reference
- Object
Overview
Structure-preserving rule for ZIP (PKZip) archives. Preserves the 4-byte local file header signature ("PK\x03\x04") and field alignment, while mutating compression methods, flags, filenames, extra fields, and compressed payloads, and automatically synchronizing CRC32 and payload lengths.
Defined in:
crowbar/rules/zip.crConstant Summary
-
ZIP_EOCD_MAGIC =
Bytes[80, 75, 5, 6] -
ZIP_LOCAL_MAGIC =
Bytes[80, 75, 3, 4]
Instance Method Summary
-
#apply(context : Context, buffer : Buffer) : Bool
Applies a structure-preserving transformation to the buffer
- #description : String
-
#match?(buffer : Buffer) : Bool
Checks whether the buffer matches the format handled by this rule
- #name : String
Instance methods inherited from class Crowbar::Rule
apply(context : Context, buffer : Buffer) : Bool
apply,
description : String
description,
match?(buffer : Buffer) : Bool
match?,
name : String
name,
targets(*targets : Symbol)
targets,
weight : Float64
weight,
weight=(weight : Float64)
weight=
Constructor methods inherited from class Crowbar::Rule
new(weight : Float64 = 1.0)
new
Instance Method Detail
Description copied from class Crowbar::Rule
Applies a structure-preserving transformation to the buffer
Description copied from class Crowbar::Rule
Checks whether the buffer matches the format handled by this rule