                 // BZip2 algorithm considers bits in a byte in a different order.
                 let bitReader = BitReader(data: pointerData.data, bitOrder: .straight)
                 bitReader.index = pointerData.index
-                // TODO: Remove `toArray`.
-                fileBytes = try BZip2.decompress(bitReader).toArray(type: UInt8.self)
+                fileData = try BZip2.decompress(bitReader)
                 bitReader.align()
                 pointerData.index = bitReader.index
             #else

        case .lzma:
            #if (!SWCOMPRESSION_POD_ZIP) || (SWCOMPRESSION_POD_ZIP && SWCOMPRESSION_POD_LZMA)
                pointerData.index += 4 // Skipping LZMA SDK version and size of properties.
                fileBytes = try LZMA.decompress(pointerData, uncompressedSize: uncompSize)
            #else
                throw ZipError.compressionNotSupported
            #endif

        var compSize = hasDataDescriptor ? info.cdEntry.compSize : info.localHeader.compSize
        var crc32 = hasDataDescriptor ? info.cdEntry.crc32 : info.localHeader.crc32

        let fileData: Data
        let pointerData = DataWithPointer(data: data)
        pointerData.index = info.localHeader.dataOffset
        switch info.compressionMethod {
        case .copy:
            fileData = Data(bytes: pointerData.bytes(count: Int(truncatingIfNeeded: uncompSize)))
        case .deflate:
            let bitReader = BitReader(data: pointerData.data, bitOrder: .reversed)
            bitReader.index = pointerData.index
            fileData = Data(bytes: try Deflate.decompress(bitReader))
            // Sometimes pointerData stays in not-aligned state after deflate decompression.
            // Following line ensures that this is not the case.
            bitReader.align()
