Importing a file inside Zip with OpenRead

How do I import a text file that is compressed inside a .Zip file using OpenRead? I know how to do it using Import

pathArqANL = "file_xyz.zip";
Import[pathArqANL, {FileBaseName[pathArqANL] <> ".anl", "Table"}]


I tried something like this:

OpenRead[pathArqANL, Method -> {"File"}]


But I found no documentation about Method.

• Why do you need to use OpenRead instead of Import? I'm not sure your way will work in all OS. – rhermans Jul 26 '18 at 20:08
• My file is about 1 GB or more. With "Import" it takes a long time, furthermore I have to filter some text inside file to get only numbers. By the way, compression rate 1 1/5, that is, files of 1 GB are stored as Zip with 200 MB. – LeoRon7 Jul 26 '18 at 20:16
• Small hack OpenRead[File["!unzip -p file_xyz.zip"]] – swish Jul 26 '18 at 20:20
• @swish That does not work on Windows. – rhermans Jul 26 '18 at 22:28
• @LeoRon7 is there a single compressed file in each zip file? Would it be a problem to unzip the file before reading it? What system are you using? – rhermans Jul 26 '18 at 22:32

strm = StringToStream[Import[pathArqANL, {FileBaseName[pathArqANL] <> ".anl", "String"}]]