From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:STL" |
|---|
| claim | "A binary STL has size == 84 + 50 * facetCount (files under 84 bytes never qualify), with the little-endian u32 count at offset 80; this test comes first because a binary header may start with "solid". Only if it fails is the file treated as ASCII, requiring "solid" after any leading whitespace and, for files of 500 bytes or more, no byte above 127 in the 500 bytes from there. That last test compares a plain char with 127, so where char is signed (typical x86 builds) it can never reject a file; where char is unsigned it can." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "STL files, as detected by assimp" |
|---|
| observed_in | |
|---|
|
|---|
| data | | trigger | "STL import" |
|---|
| effect | "size equation decides binary; solid prefix is necessary but not sufficient for ASCII; the >127 byte check is effective only where plain char is unsigned" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "IsBinarySTL and IsAsciiSTL with their comments" |
|---|
| repo | "https://github.com/assimp/assimp" |
|---|
| commit | "f20e46b3fc1fdf9bc2675fd549d180dda06861f1" |
|---|
| path | "code/AssetLib/STL/STLLoader.cpp" |
|---|
| lines | "73-125" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Binary versus ASCII detection" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T07:38:16.657Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T08:36:45.646Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read assimp STLLoader.cpp at f20e46b lines 73-125 (IsBinarySTL, IsAsciiSTL) and InternReadFile 168-200 (binary test first, then ASCII, else DeadlyImportError); char buffer compared with const char 127." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T08:04:22.343Z" |
|---|
| summary | "Qualified the non-ASCII byte test: the comparison is char > 127 on a plain char buffer, so on platforms where char is signed it can never be true; the test also skips leading whitespace first and…" |
|---|
| changed | |
|---|
|
|
|---|