mirror of
https://github.com/tsolomko/SWCompression.git
synced 2026-06-23 14:56:41 +00:00
26 lines
594 B
Swift
26 lines
594 B
Swift
// Copyright (c) 2021 Timofey Solomko
|
|
// Licensed under MIT License
|
|
//
|
|
// See LICENSE for license information
|
|
|
|
import Foundation
|
|
import BitByteData
|
|
import SWCompression
|
|
|
|
struct TestZipExtraField: ZipExtraField {
|
|
|
|
static let id: UInt16 = 0x0646
|
|
|
|
let size: Int
|
|
let location: ZipExtraFieldLocation
|
|
|
|
var helloString: String?
|
|
|
|
init(_ byteReader: LittleEndianByteReader, _ size: Int, location: ZipExtraFieldLocation) {
|
|
self.size = size
|
|
self.location = location
|
|
self.helloString = String(data: Data(byteReader.bytes(count: size)), encoding: .utf8)
|
|
}
|
|
|
|
}
|