TraceProcessor: add ZipReader
Adds a class to read zip files.
It only uses the inline file headers,doesn't
process the central directory.
The file headers are enough to tell file name, size
mtime and payload. Furthermore this allows to deal
with zip files in streaming mode, without requiring
to see the full file.
Furthermore this supports streaming line-based
decompression of text files, to process large log
files without decompressing the whole file in memory.
Bug: 240159066
Test: perfetto_unittests
Change-Id: I2b9f1714218bca40c7b033d0821482dc5085139a
diff --git a/Android.bp b/Android.bp
index 5c6c95d..50fc9b0 100644
--- a/Android.bp
+++ b/Android.bp
@@ -9370,6 +9370,7 @@
"src/trace_processor/util/proto_to_args_parser_unittest.cc",
"src/trace_processor/util/protozero_to_text_unittests.cc",
"src/trace_processor/util/streaming_line_reader_unittest.cc",
+ "src/trace_processor/util/zip_reader_unittest.cc",
],
}
@@ -9383,6 +9384,7 @@
name: "perfetto_src_trace_processor_util_zip_reader",
srcs: [
"src/trace_processor/util/streaming_line_reader.cc",
+ "src/trace_processor/util/zip_reader.cc",
],
}