Setup CI testing and building (#1)
All checks were successful
Test Workflow / Lint and test library (push) Successful in 17m20s

We want CI to be able to build the ShadowJAR for the CLI tool.

Reviewed-on: #1
This commit is contained in:
2023-12-29 15:43:53 +00:00
parent 6ebf969d35
commit 36728fa1e9
13 changed files with 174 additions and 17 deletions

View File

@@ -3,6 +3,9 @@ package ziputils
import java.nio.ByteBuffer
import java.nio.ByteOrder
/**
* Represents a partial ZIP central directory file header.
*/
internal class CentralDirectoryFileHeader(
val compressedSize: UInt,
val uncompressedSize: UInt,
@@ -22,8 +25,11 @@ internal class CentralDirectoryFileHeader(
const val SIZE = 46
/**
* Create CentralDirectoryFileHeader from raw byte data.
* @throws InvalidDataException provided ByteArray is not a supported CEN.
* Create `CentralDirectoryFileHeader` from raw byte data.
* @throws InvalidDataException provided `ByteArray` is not a supported CEN.
* @param data Raw byte data.
* @param offset Skip first <offset> bytes in data array.
* @return A `CentralDirectoryFileHeader`.
*/
@Throws(InvalidDataException::class)
fun fromByteArray(data: ByteArray, offset: Int): CentralDirectoryFileHeader {