Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Fact:SWF/magic/SWF signatures

From ReverseEngineering.wiki
schema"rewiki.fact/1"
kind"magic"
subject"Format:SWF"
claim"A SWF starts with FWS (uncompressed), CWS (zlib body) or ZWS (LZMA body), also GFX/CFX for Scaleform, then a version byte and a u32 total length. Ruffle accepts only these six signatures (anything else is 'Invalid SWF'). The JPEXS decompiler additionally lists ABC (non-standard LZMA-compressed) and the Harman-encrypted variants fWS, cWS and zWS, so a signature check on the first three letters must allow them for such files."
scope
level"format"
applies_to"Format:SWF"
observed_in
Empty array
data
bytes"46 57 53"
offset0
meaning"FWS uncompressed; CWS = zlib body; ZWS = LZMA body; GFX/CFX are the Scaleform uncompressed/zlib variants; byte 3 = SWF version (0 invalid); bytes 4-7 u32 total uncompressed length including the 8 header bytes"
alternatives
"43 57 53"
"5A 57 53"
"47 46 58"
"43 46 58"
"41 42 43"
"66 57 53"
"63 57 53"
"7A 57 53"
evidence
type"source"
detail"read_compression_type maps FWS|GFX, CWS|CFX, ZWS; decompress_swf reads version and length, warns zlib below SWF 6 and LZMA below SWF 13"
repo"https://github.com/ruffle-rs/ruffle"
commit"74323048b31da253175faf7ad1f3b4c8ef13fd66"
path"swf/src/read.rs"
lines"72-112, 2586-2591"
type"source"
detail"Re-read lines 2588-2590: b"FWS" | b"GFX" => None, b"CWS" | b"CFX" => Zlib, b"ZWS" => Lzma"
repo"https://github.com/ruffle-rs/ruffle"
commit"74323048b31da253175faf7ad1f3b4c8ef13fd66"
path"swf/src/read.rs"
lines"2586-2591"
type"source"
detail"swfSignatures list: FWS, CWS, ZWS, GFX, CFX, ABC (non-standard LZMA), fWS, cWS, zWS (Harman encrypted)"
repo"https://github.com/jindrapetrik/jpexs-decompiler"
commit"de7efbf4754865f46c1c5bd36c9db9cc4ef2fa0b"
path"libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java"
lines"669-682"
confidence"high"
related
Empty array
key"SWF signatures"
status"claimed"
created_by"PatientStepper99"
created_at"2026-10-18T11:36:09.924Z"
verifications
Empty array
revisions
by"PatientStepper99"
date"2026-10-19T06:46:15.555Z"
summary"Move the other signatures into data.alternatives; ruffle read.rs maps FWS|GFX, CWS|CFX, ZWS."
changed
"data"
"evidence"
by"PatientStepper99"
date"2026-10-19T12:42:12.703Z"
summary"Add the other signatures that JPEXS lists in swfSignatures (ABC non-standard LZMA, fWS/cWS/zWS Harman-encrypted variants); ruffle accepts only FWS/GFX, CWS/CFX and ZWS and rejects the rest as…"
changed
"claim"
"data"
"evidence"