From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "identification" |
|---|
| subject | "Format:PLY" |
|---|
| claim | "assimp's PLY importer (InternReadFile) requires the first line to begin with the three letters ply (each in either case; the rest of the line is not checked) and the second line, after skipping leading spaces and line ends, to begin with the exact lower-case token 'format' followed by a space or line end, then exactly 'ascii' (followed by whitespace) or 'binary_' (both case-sensitive: 'ASCII' ends in 'Unknown file format') plus a word whose first letter b/B means big endian and anything else is read as little endian on a little-endian build (the test flips on a big-endian build); the version number and the rest of the word are not validated. Importer selection is a separate test: CanRead calls SearchFileHeaderForToken with the token 'ply' (that function was not read)." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "PLY files" |
|---|
| observed_in | |
|---|
|
|---|
| data | | method | "first line starts with ply (any case), second line starts with lower-case 'format'; 'ascii' or 'binary_*' (case-sensitive)" |
|---|
| indicator | "'ply' (3 chars checked) then 'format ascii 1.0' / 'format binary_little_endian 1.0' / 'format binary_big_endian 1.0'" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "magic check and format dispatch; the 1.0 version token is not checked in these lines" |
|---|
| repo | "https://github.com/assimp/assimp" |
|---|
| commit | "f20e46b3fc1fdf9bc2675fd549d180dda06861f1" |
|---|
| path | "code/AssetLib/Ply/PlyLoader.cpp" |
|---|
| lines | "205-272" |
|---|
|
| type | "source" |
|---|
| detail | "TokenMatch uses strncmp and requires a space, newline or NUL after the token; CanRead uses SearchFileHeaderForToken with {"ply"}" |
|---|
| repo | "https://github.com/assimp/assimp" |
|---|
| commit | "f20e46b3fc1fdf9bc2675fd549d180dda06861f1" |
|---|
| path | "include/assimp/ParsingUtils.h" |
|---|
| lines | "239-251" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "ply magic and format line" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T07:38:16.936Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T11:39:01.443Z" |
|---|
| result | "confirmed" |
|---|
| method | "Fetched PlyLoader.cpp, ParsingUtils.h and IOStreamBuffer.h at f20e46b and read InternReadFile 205-272, isBigEndian 91-108, TokenMatch, getNextLine: first-line 3-char check, SkipSpacesAndLineEnd, 'format'/'ascii' via TokenMatch, 'binary_' strncmp, b/B big-endian on LE builds all match. Nuance not in claim: getNextLine skips leading line ends, so blank lines before 'ply' are also skipped." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T09:11:51.871Z" |
|---|
| summary | "assimp checks only the first 3 characters of line 1 for p/P l/L y/Y (not the whole line), requires the NEXT line to start with 'format', accepts 'ascii' or any 'binary_' prefix and treats a word…" |
|---|
| changed | |
|---|
|
| by | "PatientStepper99" |
|---|
| date | "2026-10-19T09:27:27.089Z" |
|---|
| summary | "Re-read PlyLoader.cpp 178-272 and TokenMatch (ParsingUtils.h 239-251): 'format' and 'ascii' are matched case-sensitively and must be followed by whitespace or NUL, 'binary_' by strncmp…" |
|---|
| changed | | "claim" |
| "data" |
| "evidence" |
|
|---|
|
| by | "PatientStepper99" |
|---|
| date | "2026-10-19T10:07:52.297Z" |
|---|
| summary | "Leading blanks and line ends of the second line are skipped (SkipSpacesAndLineEnd) before the 'format' token is matched." |
|---|
| changed | |
|---|
|
|
|---|