This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git

commit e462021f72a93bbf37223cafc7400cf2604bf23a
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Sun Jan 14 16:36:38 2024 -0500

    Internal renames
---
 .../compressors/bzip2/BZip2CompressorInputStream.java        | 12 ++++++------
 .../compressors/bzip2/BZip2CompressorOutputStream.java       |  6 +++---
 .../org/apache/commons/compress/compressors/bzip2/CRC.java   | 10 +++++-----
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java
 
b/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java
index a62313d99..cf98e3e4a 100644
--- 
a/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java
+++ 
b/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java
@@ -340,7 +340,7 @@ public class BZip2CompressorInputStream extends 
CompressorInputStream implements
     }
 
     private void endBlock() throws IOException {
-        this.computedBlockCRC = this.crc.getFinalCRC();
+        this.computedBlockCRC = this.crc.getFinal();
 
         // A bad CRC is considered a fatal error.
         if (this.storedBlockCRC != this.computedBlockCRC) {
@@ -611,7 +611,7 @@ public class BZip2CompressorInputStream extends 
CompressorInputStream implements
         // currBlockNo++;
         getAndMoveToFrontDecode();
 
-        this.crc.initializeCRC();
+        this.crc.initialize();
         this.currentState = START_BLOCK_STATE;
     }
 
@@ -850,7 +850,7 @@ public class BZip2CompressorInputStream extends 
CompressorInputStream implements
             this.su_tPos = this.data.tt[this.su_tPos];
             this.su_i2++;
             this.currentState = NO_RAND_PART_B_STATE;
-            this.crc.updateCRC(su_ch2Shadow);
+            this.crc.update(su_ch2Shadow);
             return su_ch2Shadow;
         }
         this.currentState = NO_RAND_PART_A_STATE;
@@ -877,7 +877,7 @@ public class BZip2CompressorInputStream extends 
CompressorInputStream implements
     private int setupNoRandPartC() throws IOException {
         if (this.su_j2 < this.su_z) {
             final int su_ch2Shadow = this.su_ch2;
-            this.crc.updateCRC(su_ch2Shadow);
+            this.crc.update(su_ch2Shadow);
             this.su_j2++;
             this.currentState = NO_RAND_PART_C_STATE;
             return su_ch2Shadow;
@@ -904,7 +904,7 @@ public class BZip2CompressorInputStream extends 
CompressorInputStream implements
             this.su_ch2 = su_ch2Shadow ^= this.su_rNToGo == 1 ? 1 : 0;
             this.su_i2++;
             this.currentState = RAND_PART_B_STATE;
-            this.crc.updateCRC(su_ch2Shadow);
+            this.crc.update(su_ch2Shadow);
             return su_ch2Shadow;
         }
         endBlock();
@@ -943,7 +943,7 @@ public class BZip2CompressorInputStream extends 
CompressorInputStream implements
 
     private int setupRandPartC() throws IOException {
         if (this.su_j2 < this.su_z) {
-            this.crc.updateCRC(this.su_ch2);
+            this.crc.update(this.su_ch2);
             this.su_j2++;
             return this.su_ch2;
         }
diff --git 
a/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java
 
b/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java
index 68a7a09df..c55643d7e 100644
--- 
a/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java
+++ 
b/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java
@@ -492,7 +492,7 @@ public class BZip2CompressorOutputStream extends 
CompressorOutputStream implemen
     }
 
     private void endBlock() throws IOException {
-        this.blockCRC = this.crc.getFinalCRC();
+        this.blockCRC = this.crc.getFinal();
         this.combinedCRC = this.combinedCRC << 1 | this.combinedCRC >>> 31;
         this.combinedCRC ^= this.blockCRC;
 
@@ -705,7 +705,7 @@ public class BZip2CompressorOutputStream extends 
CompressorOutputStream implemen
 
     private void initBlock() {
         // blockNo++;
-        this.crc.initializeCRC();
+        this.crc.initialize();
         this.last = -1;
         // ch = 0;
 
@@ -1232,7 +1232,7 @@ public class BZip2CompressorOutputStream extends 
CompressorOutputStream implemen
             final byte ch = (byte) currentCharShadow;
 
             int runLengthShadow = this.runLength;
-            this.crc.updateCRC(currentCharShadow, runLengthShadow);
+            this.crc.update(currentCharShadow, runLengthShadow);
 
             switch (runLengthShadow) {
             case 1:
diff --git 
a/src/main/java/org/apache/commons/compress/compressors/bzip2/CRC.java 
b/src/main/java/org/apache/commons/compress/compressors/bzip2/CRC.java
index c923e3ab5..f9ede980a 100644
--- a/src/main/java/org/apache/commons/compress/compressors/bzip2/CRC.java
+++ b/src/main/java/org/apache/commons/compress/compressors/bzip2/CRC.java
@@ -51,18 +51,18 @@ final class CRC {
     private int globalCrc;
 
     CRC() {
-        initializeCRC();
+        initialize();
     }
 
-    int getFinalCRC() {
+    int getFinal() {
         return ~globalCrc;
     }
 
-    void initializeCRC() {
+    void initialize() {
         globalCrc = 0xffffffff;
     }
 
-    void updateCRC(final int inCh) {
+    void update(final int inCh) {
         int temp = globalCrc >> 24 ^ inCh;
         if (temp < 0) {
             temp = 256 + temp;
@@ -70,7 +70,7 @@ final class CRC {
         globalCrc = globalCrc << 8 ^ CRC.crc32Table[temp];
     }
 
-    void updateCRC(final int inCh, int repeat) {
+    void update(final int inCh, int repeat) {
         int globalCrcShadow = this.globalCrc;
         while (repeat-- > 0) {
             final int temp = globalCrcShadow >> 24 ^ inCh;

Reply via email to