 
 		private struct Flags: RawRepresentable {
 			var rawValue: UInt8 {
-				return (hasCRC ? hasCRCMask : 0) | UInt8(compression != nil ? compression!.rawValue + 1 : 0)
+				return (hasCRC ? hasCRCMask : 0) | compression.rawValue
 			}
 
 			var hasCRC: Bool
-			var compression: CompressionAlgorithm?
+			var compression: CompressionAlgorithm
 
 			private let hasCRCMask: UInt8 = 1 << 3
 			private let compressionMask: UInt8 = 0x7

		let version: UInt8
		private var flags: Flags
		var hasCRC: Bool { flags.hasCRC }
		var compression: CompressionAlgorithm? { flags.compression }
		var dataOffset: Int { 8 + (flags.hasCRC ? 4 : 0) }

		init?<T: DataProtocol>(rawValue: T) where T.Index == Int {

			flags = Flags(rawValue: rawValue[7])
		}

		init(compression: CompressionAlgorithm = .none, hasCRC: Bool = false) {
			self.version = 1
			self.flags = Flags(compression: compression, hasCRC: hasCRC)
		}

		var debugDescription: String { "has CRC: \(hasCRC); compression: \(String(describing: compression))" }
	}

	private static func parseHeader(from data: Data) throws -> Header? {
