Downloading raw logs corresponding to a label


I’m analyzing logs stored in Loki via Grafana. There are some tasks for which I would like to access the raw logs corresponding to label(s). I looked at the actual stored logs and see nondescriptive filenames, a compressed binary format.

How could I both correlate which files corresponds to a label (which in my case are kubernetes pods) and uncompress them to obtain raw log lines?

Thank you!