Anonymous
Anonymous

Reputation: 53

How to read atrace data in compressed format

I am using

atrace -z

to get compressed trace file. Is there any way to decompress this file to recover original data

Upvotes: 1

Views: 560

Answers (1)

Mikhail Naganov
Mikhail Naganov

Reputation: 6871

Yes it's possible. There is just one "weird trick" to be done -- atrace prepends all of its output with done\nTRACE:\n string (see the source), so these bytes need to be removed first, and then the rest is just an output from zlib's deflate. See this answer on how to decompress it.

For example (on Linux):

dd if=<compressed-trace-file> bs=1 skip=13 | zlib-flate -uncompress

Upvotes: 1

Related Questions