 
 		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

		case unknownDataVersion
	}

	/// Identical values to `NSData.CompressionAlgorithm`.
	enum CompressionAlgorithm: Int {
		case lzfse = 0
		case lz4 = 1
		case lzma = 2
		case zlib = 3
	}

	private struct Header: RawRepresentable, CustomDebugStringConvertible {

		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 {
