I was wondering.. Is it possible to read a zipped file and calculate its entropy? I don't know how to read/open the zip file.. But I am familiar with the function Entropy.

Respuestas (2)

Guillaume
Guillaume el 11 de Dic. de 2014
Editada: Image Analyst el 11 de Dic. de 2014

1 voto

Use fread:
fid = fopen('example.zip', 'r');
a = fread(fid);
fclose(fid);
H = entropy(a);
Sean de Wolski
Sean de Wolski el 11 de Dic. de 2014

0 votos

doc unzip
doc untar
doc gunzip
Probably one of these will help.

1 comentario

Image Analyst
Image Analyst el 11 de Dic. de 2014
Nat's "Answer" to Sean moved here.
But I don't want to unzip the file. I just want to read it like that. something like:
a=readfile('example.zip');
H=entropy(a);

Iniciar sesión para comentar.

Categorías

Más información sobre Data Import and Export en Centro de ayuda y File Exchange.

Preguntada:

Nat
el 11 de Dic. de 2014

Editada:

el 11 de Dic. de 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by