@@ -54,19 +54,15 @@ This file is part of the iText (R) project.
54
54
import java .util .TreeMap ;
55
55
import java .util .TreeSet ;
56
56
57
-
57
+ //TODO DEVSIX-6406: add support for indeterminate-segment-size value of dataLength
58
58
/**
59
59
* Class to read a JBIG2 file at a basic level: understand all the segments,
60
60
* understand what segments belong to which pages, how many pages there are,
61
61
* what the width and height of each page is, and global segments if there
62
62
* are any. Or: the minimum required to be able to take a normal sequential
63
63
* or random-access organized file, and be able to embed JBIG2 pages as images
64
64
* in a PDF.
65
- *
66
- * TODO: the indeterminate-segment-size value of dataLength, else?
67
- *
68
65
*/
69
-
70
66
public class Jbig2SegmentReader {
71
67
//see 7.4.2.
72
68
public static final int SYMBOL_DICTIONARY = 0 ;
@@ -255,8 +251,8 @@ public void read() throws java.io.IOException {
255
251
void readSegment (Jbig2Segment s ) throws java .io .IOException {
256
252
int ptr = (int ) ra .getPosition ();
257
253
254
+ //TODO DEVSIX-6406 7.2.7 not supported
258
255
if (s .dataLength == 0xffffffffl ) {
259
- // TODO figure this bit out, 7.2.7
260
256
return ;
261
257
}
262
258
@@ -340,7 +336,6 @@ Jbig2Segment readHeader() throws java.io.IOException {
340
336
} else if (segment_number <= 65536 ) {
341
337
referred_to_segment_numbers [i ] = ra .readUnsignedShort ();
342
338
} else {
343
- // TODO wtf ack
344
339
referred_to_segment_numbers [i ] = (int ) ra .readUnsignedInt ();
345
340
}
346
341
}
@@ -374,7 +369,7 @@ Jbig2Segment readHeader() throws java.io.IOException {
374
369
375
370
// 7.2.7
376
371
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
378
373
s .dataLength = segment_data_length ;
379
374
380
375
int end_ptr = (int ) ra .getPosition ();
0 commit comments