From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "magic" |
|---|
| subject | "Format:Squirrel bytecode" |
|---|
| claim | "A Squirrel compiled closure stream starts with the u16 tag FA FA, then the u32 'SQIR' head tag (bytes 52 49 51 53), then u32 sizeof(SQChar), sizeof(SQInteger) and sizeof(SQFloat); the stream ends with the u32 TAIL tag (54 41 49 4C)." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Squirrel bytecode" |
|---|
| observed_in | |
|---|
|
|---|
| data | | bytes | "FA FA 52 49 51 53" |
|---|
| offset | 0 |
|---|
| meaning | "Squirrel 3.x closure stream: 0xFAFA tag + SQ_CLOSURESTREAM_HEAD (little-endian u32 0x53514952)" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "sq_writeclosure writes the unsigned short SQ_BYTECODE_STREAM_TAG (0xFAFA) before SQClosure::Save" |
|---|
| repo | "https://github.com/albertodemichelis/squirrel" |
|---|
| commit | "f9267f2f2a9afa1face89d8ea078c686331e30d1" |
|---|
| path | "squirrel/sqapi.cpp" |
|---|
| lines | "1260-1275" |
|---|
|
| type | "source" |
|---|
| detail | "SQClosure::Save writes HEAD, sizeof(SQChar), sizeof(SQInteger), sizeof(SQFloat), the prototype, TAIL; tags defined in squirrel/sqobject.h lines 13-15" |
|---|
| repo | "https://github.com/albertodemichelis/squirrel" |
|---|
| commit | "f9267f2f2a9afa1face89d8ea078c686331e30d1" |
|---|
| path | "squirrel/sqobject.cpp" |
|---|
| lines | "377-386" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T11:34:29.650Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T06:47:39.951Z" |
|---|
| result | "confirmed" |
|---|
| method | "Recomputed byte order by hand from the constants in the fact: SQ_CLOSURESTREAM_HEAD 0x53514952 ('SQIR' as a big-endian char literal) written as a native little-endian u32 is 52 49 51 53, and 0xFAFA as u16 is FA FA. Did not re-read the cited source lines." |
|---|
|
|
|---|