java - Reading zipped vs unzipped files into memory -
i have single file, delivered .zip, , want read memory. zipped 50 mb , unzipped 700mb. wondering if should unzip file first , read or if makes no difference , can read data zip file directly.
in case of normal file use inputstreamreader
wrapped around fileinputstream
.
for zip file use java.util.zipfile
inputstream
zipentry
, again wrap inputstreamreader
around it.
in end work inputstreamreader
in both cases.
i tried test it, locally can't read such large file without running out of memory. on server process runs more processes interfering couldn't quite tell if there difference.
does know, if 1 of options uses more memory other ot question of design, way use?
greetings, uwe
the difference small performance hit unzipping file. in both cases inputstreamreader
read unpacked 700 mb file.
the next question should ask, why need read large file memory? necessary? maybe can process line line without holding lines in memory.
Comments
Post a Comment