You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2018/03/28 16:12:59 UTC
svn commit: r1827928 -
/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxDecoderStream.java
Author: tilman
Date: Wed Mar 28 16:12:59 2018
New Revision: 1827928
URL: http://svn.apache.org/viewvc?rev=1827928&view=rev
Log:
PDFBOX-4170: Update twelvemonkeys changes made after 9.3.2017 up to commit a5471ef from 17.1.2018, except commit 4e640dd which didn't work. Actual change is commit cce1c06 which simplifies optionByteAligned and resetBuffer().
Modified:
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxDecoderStream.java
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxDecoderStream.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxDecoderStream.java?rev=1827928&r1=1827927&r2=1827928&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxDecoderStream.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxDecoderStream.java Wed Mar 28 16:12:59 2018
@@ -258,7 +258,7 @@ final class CCITTFaxDecoderStream extend
private void decodeRowType4() throws IOException {
if(optionByteAligned) {
- bufferPos = -1; // Skip remaining bits and fetch the next byte at row start
+ resetBuffer();
}
eof: while (true) {
// read till next EOL code
@@ -287,7 +287,7 @@ final class CCITTFaxDecoderStream extend
private void decodeRowType6() throws IOException {
if(optionByteAligned) {
- bufferPos = -1; // Skip remaining bits and fetch the next byte at row start
+ resetBuffer();
}
decode2D();
}
@@ -383,17 +383,7 @@ final class CCITTFaxDecoderStream extend
}
private void resetBuffer() throws IOException {
- for (int i = 0; i < decodedRow.length; i++) {
- decodedRow[i] = 0;
- }
-
- while (true) {
- if (bufferPos == -1) {
- return;
- }
-
- readBit();
- }
+ bufferPos = -1;
}
int buffer = -1;