Esempio n. 1
0
unsigned long long FIO_decompressLegacyFrame(FILE* foutput, FILE* finput, U32 magicNumberLE)
{
	switch(magicNumberLE)
	{
		case ZSTDv01_magicNumberLE :
			return FIOv01_decompressFrame(foutput, finput);
		case ZSTDv02_magicNumber :
			return FIOv02_decompressFrame(foutput, finput);
		case ZSTDv03_magicNumber :
			return FIOv03_decompressFrame(foutput, finput);
		case ZSTDv04_magicNumber :
		    {   dRessv04_t r = FIOv04_createDResources();
                unsigned long long const s = FIOv04_decompressFrame(r, foutput, finput);
                FIOv04_freeDResources(r);
                return s;
		    }
		case ZSTDv05_MAGICNUMBER :
		    {   dRessv05_t r = FIOv05_createDResources();
                unsigned long long const s = FIOv05_decompressFrame(r, foutput, finput);
                FIOv05_freeDResources(r);
                return s;
		    }
		default :
		    return ERROR(prefix_unknown);
	}
}
Esempio n. 2
0
unsigned long long FIO_decompressLegacyFrame(FILE* foutput, FILE* finput,
                                             const void* dictBuffer, size_t dictSize,
                                             U32 magicNumberLE)
{
    switch(magicNumberLE)
    {
        case ZSTDv01_magicNumberLE :
            return FIOv01_decompressFrame(foutput, finput);
        case ZSTDv02_magicNumber :
            return FIOv02_decompressFrame(foutput, finput);
        case ZSTDv03_magicNumber :
            return FIOv03_decompressFrame(foutput, finput);
        case ZSTDv04_magicNumber :
            {   dRessv04_t r = FIOv04_createDResources();
                unsigned long long const s = FIOv04_decompressFrame(r, foutput, finput);
                FIOv04_freeDResources(r);
                return s;
            }
        case ZSTDv05_MAGICNUMBER :
            {   dRessv05_t r = FIOv05_createDResources();
                r.dictBuffer = dictBuffer;
                r.dictBufferSize = dictSize;
                {   unsigned long long const s = FIOv05_decompressFrame(r, foutput, finput);
                    FIOv05_freeDResources(r);
                    return s;
            }   }
        case ZSTDv06_MAGICNUMBER :
            {   dRessv06_t r = FIOv06_createDResources();
                r.dictBuffer = dictBuffer;
                r.dictBufferSize = dictSize;
                {   unsigned long long const s = FIOv06_decompressFrame(r, foutput, finput);
                    FIOv06_freeDResources(r);
                    return s;
            }   }
        case ZSTDv07_MAGICNUMBER :
            {   dRessv07_t r = FIOv07_createDResources();
                r.dictBuffer = dictBuffer;
                r.dictBufferSize = dictSize;
                {   unsigned long long const s = FIOv07_decompressFrame(r, foutput, finput);
                    FIOv07_freeDResources(r);
                    return s;
            }   }
        default :
            return ERROR(prefix_unknown);
    }
}