@@ -54,19 +54,15 @@ This file is part of the iText (R) project.
5454import java .util .TreeMap ;
5555import java .util .TreeSet ;
5656
57-
57+ //TODO DEVSIX-6406: add support for indeterminate-segment-size value of dataLength
5858/**
5959 * Class to read a JBIG2 file at a basic level: understand all the segments,
6060 * understand what segments belong to which pages, how many pages there are,
6161 * what the width and height of each page is, and global segments if there
6262 * are any. Or: the minimum required to be able to take a normal sequential
6363 * or random-access organized file, and be able to embed JBIG2 pages as images
6464 * in a PDF.
65- *
66- * TODO: the indeterminate-segment-size value of dataLength, else?
67- *
6865 */
69-
7066public class Jbig2SegmentReader {
7167 //see 7.4.2.
7268 public static final int SYMBOL_DICTIONARY = 0 ;
@@ -255,8 +251,8 @@ public void read() throws java.io.IOException {
255251 void readSegment (Jbig2Segment s ) throws java .io .IOException {
256252 int ptr = (int ) ra .getPosition ();
257253
254+ //TODO DEVSIX-6406 7.2.7 not supported
258255 if (s .dataLength == 0xffffffffl ) {
259- // TODO figure this bit out, 7.2.7
260256 return ;
261257 }
262258
@@ -340,7 +336,6 @@ Jbig2Segment readHeader() throws java.io.IOException {
340336 } else if (segment_number <= 65536 ) {
341337 referred_to_segment_numbers [i ] = ra .readUnsignedShort ();
342338 } else {
343- // TODO wtf ack
344339 referred_to_segment_numbers [i ] = (int ) ra .readUnsignedInt ();
345340 }
346341 }
@@ -374,7 +369,7 @@ Jbig2Segment readHeader() throws java.io.IOException {
374369
375370 // 7.2.7
376371 long segment_data_length = ra .readUnsignedInt ();
377- // TODO the 0xffffffff value that might be here, and how to understand those afflicted segments
372+ //TODO DEVSIX-6406 the 0xffffffff value that might be here, and how to understand those afflicted segments
378373 s .dataLength = segment_data_length ;
379374
380375 int end_ptr = (int ) ra .getPosition ();
0 commit comments