在Java中,我会将一个GZIPInputStream封装在FileInputStream中并完成。 Scala中的等价物是如何完成的?如何在Scala中读取gzip'd文件
Source.fromFile("a.csv.gz")....
FROMFILE返回BufferedSource,这真的想要把世界看成行的集合。
有没有比这更优雅的方式?
Source.fromInputStream(new GZIPInputStream(new BufferedInputStream(new FileInputStream("a.csv.gz"))))
这不是*完全*重复,但[这个问题](http://stackoverflow.com/questions/5153544/how-to-从压缩包中读取-xml-files-in-scala-code)可能会有用。 – 2013-02-18 15:54:11