search: add support for searching compressed files

This commit adds opt-in support for searching compressed files during
recursive search. This behavior is only enabled when the
`-z/--search-zip` flag is passed to ripgrep. When enabled, a limited set
of common compression formats are recognized via file extension, and a
new process is spawned to perform the decompression. ripgrep then
searches the stdout of that spawned process.

Closes #539
This commit is contained in:
Balaji Sivaraman
2018-01-07 21:35:58 +05:30
committed by Andrew Gallant
parent a8543f798d
commit f007f940c5
18 changed files with 373 additions and 24 deletions

View File

@@ -4,6 +4,7 @@ extern crate bytecount;
extern crate clap;
extern crate encoding_rs;
extern crate env_logger;
extern crate globset;
extern crate grep;
extern crate ignore;
#[macro_use]
@@ -44,6 +45,7 @@ macro_rules! eprintln {
mod app;
mod args;
mod decoder;
mod decompressor;
mod pathutil;
mod printer;
mod search_buffer;