| Цитата | % DDECOMPRESS - decompress DZIP output to recover original data % % % VARIABLES: % Z = compressed variable to decompress % M = decompressed output % % NOTES: (1) The input variable Z is created by the DZIP function and % is a vector of type uint8 % (2) The decompressed output will have the same data type and % dimensions as the original data provided to DZIP. % (3) See DZIP for other notes.
function M = ddecompress(Z,op)
import com.mathworks.mlwidgets.io.InterruptibleStreamCopier
a=java.io.ByteArrayInputStream(Z); b=java.util.zip.InflaterInputStream(a);
isc = InterruptibleStreamCopier.getInterruptibleStreamCopier; c = java.io.ByteArrayOutputStream; isc.copyStream(b,c); if op == 't' Q=typecast(c.toByteArray,'uint8'); else Q=typecast(c.toByteArray,'single'); end M=Q; return |
Я пробовал: DeflateStream GZipStream GZipInputStream (Шарп)
но им не нравится хедер файла , т.е. я не знаю что пользовать.
Положил сдесь архив и деархив.
Буду признателен за любую помощь, идей, принципов
|