Skip to content

Commit e77320d

Browse files
committed
Bump version -> 1.1.2
1 parent 5262b65 commit e77320d

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>software.coley</groupId>
88
<artifactId>lljzip</artifactId>
9-
<version>1.1.1</version>
9+
<version>1.1.2</version>
1010

1111
<properties>
1212
<junit.version>5.8.2</junit.version>

src/main/java/software/coley/llzip/part/JvmLocalFileHeader.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* @author Wolfie / win32kbase <i>(Reverse engineering JVM specific zip handling)</i>
1414
*/
1515
public class JvmLocalFileHeader extends LocalFileHeader {
16-
1716
private final NavigableSet<Long> offsets;
1817

1918
/**
@@ -29,11 +28,11 @@ public void read(ByteData data, long offset) {
2928
super.read(data, offset);
3029
// JVM file data reading does NOT use the compressed/uncompressed fields.
3130
// Instead, it scans data until the next header/EOF.
32-
offset += 30 + getFileNameLength() + getExtraFieldLength();
31+
offset += MIN_FIXED_SIZE + getFileNameLength() + getExtraFieldLength();
3332
Long nextOffset = offsets.ceiling(offset);
3433
if (nextOffset != null)
3534
setFileData(data.slice(offset, nextOffset));
36-
else
35+
else
3736
setFileData(data.slice(offset, data.length()));
3837
}
3938
}

src/main/java/software/coley/llzip/part/LocalFileHeader.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* @author Matt Coley
1616
*/
1717
public class LocalFileHeader implements ZipPart, ZipRead {
18+
protected static final int MIN_FIXED_SIZE = 30;
1819
private transient long offset = -1L;
1920
private transient CentralDirectoryFileHeader linkedDirectoryFileHeader;
2021
// Zip spec elements
@@ -60,7 +61,7 @@ public void read(ByteData data, long offset) {
6061

6162
@Override
6263
public int length() {
63-
return 30 + (int) fileName.length() + (int) extraField.length() + (int) fileData.length();
64+
return MIN_FIXED_SIZE + (int) fileName.length() + (int) extraField.length() + (int) fileData.length();
6465
}
6566

6667
@Override

src/main/java/software/coley/llzip/util/ByteData.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* @author xDark
1010
*/
1111
public interface ByteData {
12-
1312
/**
1413
* Gets int at specific position.
1514
*

0 commit comments

Comments
 (0)