Skip to content

Name unknown E57 codecs in the rejection and raise the prototype field limit - #71

Open
mahach666 wants to merge 1 commit into
feature/issue-19-e57-validityfrom
feature/issue-20-e57-codecs
Open

mahach666 wants to merge 1 commit into
feature/issue-19-e57-validityfrom
feature/issue-20-e57-codecs

Conversation

@mahach666

Copy link
Copy Markdown
Contributor

Closes #20

Based on #70 (the branch feature/issue-19-e57-validity); merge the earlier pull requests first.

What changed

  • A scan whose <codecs> vector names anything is now rejected with a message that names the codec elements
    (e.g. the scan uses compressed vector codecs other than plain bit-packing (codec, mysteryCodec)), instead of a generic
    text. Plain bit-packing (an empty codecs vector) decodes as before.
  • The point prototype field limit is raised from 1024 to 65535, the bound of the data packet header (a stream count is
    a 16-bit value), so wider prototypes decode. A larger prototype still lists and fails with NotSupportedException when
    its points are read.
  • E57Spec accepts custom codecs XML for tests.

Files changed

  • src/PclIO/Formats/E57/E57Document.cs: codec naming (DescribeCodecs), the raised limit and its message, updated class
    documentation.
  • tests/PclIO.Tests/E57Spec.cs: the new CodecsXml property.
  • tests/PclIO.Tests/FormatTests.cs: new tests for a named codec, for an over-limit prototype and for a 1503-field
    prototype that decodes.
  • tests/PclIO.Tests/InputHardeningTests.cs: the field-limit boundary test moved to 65535/65536.
  • README.md, CHANGELOG.md: the new behaviour and limits.

Tests

  • dotnet build — 0 warnings, 0 errors.
  • dotnet test — 656 passed, 0 failed, 10 skipped (the tests that need private scan files) on .NET 8 and .NET 10.

Limits

  • Plain bit-packing stays the only decoded codec: within the clean-room rules used here (public specification only, no
    implementation-derived knowledge) no further E57 vector codec is attested, so there is nothing further to decode. A file
    that names another codec keeps today's behaviour (listed, rejected by name at read time) instead of being guessed.
    If test files using another standardized codec become available, only the layout builder needs a new branch.
  • Images stay unread.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant