 	}
 
 	static func write(to url: URL, compression: CompressionAlgorithm = .none) throws {
-		guard let data = self.data(compression: compression) else { throw UTS46Error.compressionError }
+		let data = try self.data(compression: compression)
 		try data.write(to: url)
 	}
 

		return data
	}

	static func data(compression: CompressionAlgorithm = .none, includeCRC: Bool = true) -> Data? {
		var outputData = Data()

		var data = self.characterMapData() + self.disallowedCharactersData() + self.ignoredCharactersData() + self.joiningTypesData()

			let capacity = 100_000
			let destinationBuffer = UnsafeMutablePointer<UInt8>.allocate(capacity: capacity)

			let compressed = try data.withUnsafeBytes { (rawBuffer) -> Data? in
				let bound = rawBuffer.bindMemory(to: UInt8.self)
				let encodedCount = compression_decode_buffer(destinationBuffer, capacity, bound.baseAddress!, rawBuffer.count, nil, rawAlgorithm)

				if encodedCount == 0 {
					throw UTS46Error.compressionError
				}

				return Data(bytes: destinationBuffer, count: encodedCount)
