diff --git a/proposal/myrmidon/src/main/org/apache/tools/bzip2/BZip2Constants.java b/proposal/myrmidon/src/main/org/apache/tools/bzip2/BZip2Constants.java index e54587a8a..39af820d5 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/bzip2/BZip2Constants.java +++ b/proposal/myrmidon/src/main/org/apache/tools/bzip2/BZip2Constants.java @@ -15,8 +15,7 @@ package org.apache.tools.bzip2; */ public interface BZip2Constants { - - int baseBlockSize = 100000; + int BASE_BLOCK_SIZE = 100000; int MAX_ALPHA_SIZE = 258; int MAX_CODE_LEN = 23; int RUNA = 0; @@ -27,7 +26,8 @@ public interface BZip2Constants int MAX_SELECTORS = ( 2 + ( 900000 / G_SIZE ) ); int NUM_OVERSHOOT_BYTES = 20; - int rNums[] = { + int RAND_NUMS[] = + { 619, 720, 127, 481, 931, 816, 813, 233, 566, 247, 985, 724, 205, 454, 863, 491, 741, 242, 949, 214, 733, 859, 335, 708, 621, 574, 73, 654, 730, 472, diff --git a/proposal/myrmidon/src/main/org/apache/tools/bzip2/CBZip2InputStream.java b/proposal/myrmidon/src/main/org/apache/tools/bzip2/CBZip2InputStream.java index 20f34ad3f..7a465bfd8 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/bzip2/CBZip2InputStream.java +++ b/proposal/myrmidon/src/main/org/apache/tools/bzip2/CBZip2InputStream.java @@ -188,7 +188,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants if( newSize100k == 0 ) return; - int n = baseBlockSize * newSize100k; + int n = BASE_BLOCK_SIZE * newSize100k; ll8 = new char[ n ]; tt = new int[ n ]; } @@ -306,7 +306,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants tPos = tt[ tPos ]; if( rNToGo == 0 ) { - rNToGo = rNums[ rTPos ]; + rNToGo = RAND_NUMS[ rTPos ]; rTPos++; if( rTPos == 512 ) rTPos = 0; @@ -344,7 +344,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants tPos = tt[ tPos ]; if( rNToGo == 0 ) { - rNToGo = rNums[ rTPos ]; + rNToGo = RAND_NUMS[ rTPos ]; rTPos++; if( rTPos == 512 ) rTPos = 0; @@ -391,7 +391,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants int groupNo; int groupPos; - limitLast = baseBlockSize * blockSize100k; + limitLast = BASE_BLOCK_SIZE * blockSize100k; origPtr = bsGetIntVS( 24 ); recvDecodingTables(); diff --git a/proposal/myrmidon/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java b/proposal/myrmidon/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java index 0b89c4eeb..f266edf49 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java +++ b/proposal/myrmidon/src/main/org/apache/tools/bzip2/CBZip2OutputStream.java @@ -399,7 +399,7 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants private void allocateCompressStructures() { - int n = baseBlockSize * blockSize100k; + int n = BASE_BLOCK_SIZE * blockSize100k; block = new char[ ( n + 1 + NUM_OVERSHOOT_BYTES ) ]; quadrant = new int[ ( n + NUM_OVERSHOOT_BYTES ) ]; zptr = new int[ n ]; @@ -871,7 +871,7 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants /* * 20 is just a paranoia constant */ - allowableBlockSize = baseBlockSize * blockSize100k - 20; + allowableBlockSize = BASE_BLOCK_SIZE * blockSize100k - 20; } private void initialize() @@ -1277,7 +1277,7 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants { if( rNToGo == 0 ) { - rNToGo = (char)rNums[ rTPos ]; + rNToGo = (char)RAND_NUMS[ rTPos ]; rTPos++; if( rTPos == 512 ) rTPos = 0; diff --git a/proposal/myrmidon/src/todo/org/apache/tools/bzip2/BZip2Constants.java b/proposal/myrmidon/src/todo/org/apache/tools/bzip2/BZip2Constants.java index e54587a8a..39af820d5 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/bzip2/BZip2Constants.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/bzip2/BZip2Constants.java @@ -15,8 +15,7 @@ package org.apache.tools.bzip2; */ public interface BZip2Constants { - - int baseBlockSize = 100000; + int BASE_BLOCK_SIZE = 100000; int MAX_ALPHA_SIZE = 258; int MAX_CODE_LEN = 23; int RUNA = 0; @@ -27,7 +26,8 @@ public interface BZip2Constants int MAX_SELECTORS = ( 2 + ( 900000 / G_SIZE ) ); int NUM_OVERSHOOT_BYTES = 20; - int rNums[] = { + int RAND_NUMS[] = + { 619, 720, 127, 481, 931, 816, 813, 233, 566, 247, 985, 724, 205, 454, 863, 491, 741, 242, 949, 214, 733, 859, 335, 708, 621, 574, 73, 654, 730, 472, diff --git a/proposal/myrmidon/src/todo/org/apache/tools/bzip2/CBZip2InputStream.java b/proposal/myrmidon/src/todo/org/apache/tools/bzip2/CBZip2InputStream.java index 20f34ad3f..7a465bfd8 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/bzip2/CBZip2InputStream.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/bzip2/CBZip2InputStream.java @@ -188,7 +188,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants if( newSize100k == 0 ) return; - int n = baseBlockSize * newSize100k; + int n = BASE_BLOCK_SIZE * newSize100k; ll8 = new char[ n ]; tt = new int[ n ]; } @@ -306,7 +306,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants tPos = tt[ tPos ]; if( rNToGo == 0 ) { - rNToGo = rNums[ rTPos ]; + rNToGo = RAND_NUMS[ rTPos ]; rTPos++; if( rTPos == 512 ) rTPos = 0; @@ -344,7 +344,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants tPos = tt[ tPos ]; if( rNToGo == 0 ) { - rNToGo = rNums[ rTPos ]; + rNToGo = RAND_NUMS[ rTPos ]; rTPos++; if( rTPos == 512 ) rTPos = 0; @@ -391,7 +391,7 @@ public class CBZip2InputStream extends InputStream implements BZip2Constants int groupNo; int groupPos; - limitLast = baseBlockSize * blockSize100k; + limitLast = BASE_BLOCK_SIZE * blockSize100k; origPtr = bsGetIntVS( 24 ); recvDecodingTables(); diff --git a/proposal/myrmidon/src/todo/org/apache/tools/bzip2/CBZip2OutputStream.java b/proposal/myrmidon/src/todo/org/apache/tools/bzip2/CBZip2OutputStream.java index 0b89c4eeb..f266edf49 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/bzip2/CBZip2OutputStream.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/bzip2/CBZip2OutputStream.java @@ -399,7 +399,7 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants private void allocateCompressStructures() { - int n = baseBlockSize * blockSize100k; + int n = BASE_BLOCK_SIZE * blockSize100k; block = new char[ ( n + 1 + NUM_OVERSHOOT_BYTES ) ]; quadrant = new int[ ( n + NUM_OVERSHOOT_BYTES ) ]; zptr = new int[ n ]; @@ -871,7 +871,7 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants /* * 20 is just a paranoia constant */ - allowableBlockSize = baseBlockSize * blockSize100k - 20; + allowableBlockSize = BASE_BLOCK_SIZE * blockSize100k - 20; } private void initialize() @@ -1277,7 +1277,7 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants { if( rNToGo == 0 ) { - rNToGo = (char)rNums[ rTPos ]; + rNToGo = (char)RAND_NUMS[ rTPos ]; rTPos++; if( rTPos == 512 ) rTPos = 0;