[ 
https://issues.apache.org/jira/browse/TIKA-5036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18139103#comment-18139103
 ] 

ASF GitHub Bot commented on TIKA-5036:
--------------------------------------

tballison commented on PR #3540:
URL: https://github.com/apache/tika/pull/3540#issuecomment-6665843817

   Bot nits below.
   
   If you have any example files for unit tests great. Even if they're 
synthetic, they'd be good to add, but that isn't a blocker for me.
   
   ```
    1. No real-file fixture (SketchUpParserTest). Every test file comes from 
the test's own header(), cdib() and zipped()
        helpers. So the tests show the parser matches the author's model of the 
format, not SketchUp's. The "107 real files,
        byte for byte" claim can't be re-checked from the repo. Ask for one 
small, redistributable file per layout (a CDib one
        up to 2020, a zip one fromĀ 2021), made by the author.
     2. The CDib marker hard-codes schema 3 (SketchUpParser.java, the CDIB 
constant). The javadoc calls it "a 16-bit schema",
        but the search matches only 03 00. A version that writes a different 
schema would silently produce no thumbnail rather
        than an error. Either match only ff ff ?? ?? 04 00 CDib or state that 3 
is the only schema seen.
     3. The CDib read sizes itself from the record's length field. 
IOUtils.toByteArray(record, (int) length) trusts that field,
        up to 16 MB. Depending on the commons-io version, a tiny file could 
make it allocate the full 16 MB upfront. The zip
        path already uses readNBytes; doing the same here and checking the byte 
count would be consistent and safer.
   
   ```
   




> Blender and SketchUp: emit the embedded preview
> -----------------------------------------------
>
>                 Key: TIKA-5036
>                 URL: https://issues.apache.org/jira/browse/TIKA-5036
>             Project: Tika
>          Issue Type: Improvement
>          Components: mime, parser
>            Reporter: Dominik Schmidt
>            Priority: Major
>
> {{.blend}} files carry a {{TEST}} block with an RGBA preview, {{.skp}} files 
> an embedded PNG. Emitting it as THUMBNAIL gives both a preview.
> Both need media types first, see TIKA-3992. Note that {{.skp}} is registered 
> as {{application/vnd.koan}} (SSEYO Koan), which SketchUp files collide with.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to