Inventory FWS and CWS files through the shared artifact reader. Preserve the carrier and normalized identities, top-level tag counts, and individual DefineBinaryData occurrences. Use the existing selected-extraction pipeline and per-call artifact admission controls. Refs #3614 Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
3.4 KiB
Flash SWF files
Use inspect-artifact or inspect_artifact to read a local SWF container and
list its top-level binary-data payloads. The reader recognizes FWS (stored),
CWS (zlib), and ZWS (LZMA) by their signatures. It inventories FWS and CWS.
An inventory request for ZWS returns an unsupported-format error. Supply an
FWS or CWS copy to inspect it.
rea inspect-artifact ./movie.swf --json
rea extract-artifact ./movie.swf --occurrence-id occ_EXAMPLE --output-root /absolute/selected-swf --json
Replace occ_EXAMPLE with the occurrence ID from the inventory. Through MCP,
use open_binary on the file, then inspect_artifact. Pass the selected IDs
as occurrence_ids and a fresh absolute destination as output_root to
extract_artifact. For a large inventory, request detail: "summary". Page
the complete parent Evidence with the inventory view of
inspect_analysis_view.
Read the evidence
The root format_metadata reports the source signature, SWF version,
stage rectangle in twips, declared frame rate and count, and counts by
top-level tag code. The ActionScript 3 flag comes from FileAttributes.
A missing tag leaves the flag unknown. Tag counts describe framing, including
script tags, without decoding bytecode or nested sprite timelines.
Each top-level DefineBinaryData payload has its own occurrence, with its
character ID, matching SymbolClass names and normalized offsets. Logical
paths use the character ID. A payload starting with a SWF signature gets a
.swf suffix and reports the observed signature. Other payloads get .bin.
Extract a selected candidate and inspect it separately to validate its
structure. Equal payload bytes can share a digest while their occurrences
remain distinct. Artifact comparison compares SymbolClass names at matching
logical paths.
The inventory retains the SHA-256 of the original file and a separate
normalized_sha256 of its FWS representation. Equivalent FWS and CWS files
share the normalized digest. Normalized offsets include the eight-byte
header. Only FWS payloads also have a physical source_location in the
original file. Extraction writes the payload bytes as held in the tag,
independent of the outer container's compression.
Limits
Pass artifact_limits.swf to adjust reader admission for the next call
(CLI --artifact-limits with JSON). Each field accepts a positive integer.
| Field | Default | Maximum | Applies to |
|---|---|---|---|
movie_bytes |
64 MiB | 128 MiB | Source and normalized movie, individually |
tag_count |
100,000 | 200,000 | Top-level tags, including End |
binary_data_count |
8,192 | 16,384 | Extractable DefineBinaryData occurrences |
symbol_bytes |
1 MiB | 4 MiB | Total bytes in SymbolClass tag payloads |
The reader checks the declared decoded length before inflation. A CWS body
also obeys artifact_limits.expanded_bytes, and its zlib stream must consume
the whole compressed body. On a limit refusal, the result reports the active
parameter, effective value, and the amount needed at that boundary.
REA reports malformed framing and capacity refusals through the artifact
error contract. Reading and extracting use local bytes and do not execute
ActionScript.