# efficient-data-systems-lab-gzhu/loglite architecture

> Architecture diagram of the GitHub repository efficient-data-systems-lab-gzhu/loglite, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/efficient-data-systems-lab-gzhu/loglite
- Repository: https://github.com/efficient-data-systems-lab-gzhu/loglite

## Overview

LogLite is a research repository for line-wise log compression, alongside comparison implementations. Its primary workflow is to pass a line-oriented input file to the CLI, produce a compressed bytestream or bitstream, and optionally decompress it or test round-trip behavior. The README also documents Zstd/LZMA post-compression and distinct baseline families. Source excerpts do not show LogLite’s internal call graph, so implementation links are omitted rather than inferred; documented workflows and sampled baseline relationships are represented where supported.

Main entry points: [`LogLite-B/src/tools/xorc-cli.cc`](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/LogLite-B/src/tools/xorc-cli.cc) (LogLite CLI), [`baselines/lzbench/_lzbench/lzbench.cpp`](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/lzbench/_lzbench/lzbench.cpp) (LZBench codecs), [`LogLite-B/src/compress/stream_compress.cc`](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/LogLite-B/src/compress/stream_compress.cc) (Stream codec), [`LogLite-B/src/common/file.cc`](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/LogLite-B/src/common/file.cc) (File handling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_loglite["LogLite compressors"]
  node_lite_cli["LogLite CLI<br/>[xorc-cli.cc]"]
  node_stream_codec["Stream codec<br/>[stream_compress.cc]"]
  node_file_io["File handling<br/>[file.cc]"]
  node_rle["RLE helper<br/>[rle.cc]"]
  node_xor["XOR strings<br/>[xor_string.cc]"]
  node_loglite_b["LogLite-b variant<br/>[stream_compress.cc]"]
  node_zstd_dict["Zstd dictionary test<br/>[linetest-zstd.cpp]"]
end

subgraph group_baselines["Compression baselines"]
  node_fsst["FSST codec<br/>[fsst.cpp]"]
  node_pbc_train["PBC training<br/>[pbc_train.cc]"]
  node_pbc_codec["PBC codec<br/>[compress.cc]"]
end

subgraph group_logparse["Log parsing baselines"]
  node_loggrep_l["LogGrep-L compression<br/>[main.cpp]"]
  node_loggrep_z["LogGrep-Z compression<br/>[main.cpp]"]
  node_logreducer["LogReducer<br/>[main.cpp]"]
  node_logshrink["LogShrink parser<br/>[main.cpp]"]
end

subgraph group_benchmark["General compressors"]
  node_lzbench["LZBench codecs<br/>[lzbench.cpp]"]
  node_zstd["Zstd implementation<br/>[zstd_compress.c]"]
  node_lzma["LZMA implementation<br/>[LzmaLib.h]"]
end

node_user(("CLI user"))

node_user -->|"selects mode"| node_lite_cli
node_lite_cli -.->|"compresses or decompresses"| node_stream_codec
node_lite_cli -.->|"reads and writes files"| node_file_io
node_lite_cli -.-> node_rle
node_lite_cli -.-> node_xor
node_user -->|"runs line compression"| node_loglite_b
node_user -->|"runs dictionary test"| node_zstd_dict
node_user -->|"runs line baseline"| node_fsst
node_user -->|"trains patterns"| node_pbc_train
node_user -->|"compresses logs"| node_pbc_codec
node_user -.->|"runs baseline"| node_loggrep_l
node_user -.->|"runs baseline"| node_loggrep_z
node_user -->|"trains and compresses"| node_logreducer
node_user -.->|"runs parser"| node_logshrink
node_user -->|"selects codecs"| node_lzbench
node_lzbench -.->|"uses codec"| node_zstd
node_lzbench -.->|"uses codec"| node_lzma

click node_lite_cli "https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/LogLite-B/src/tools/xorc-cli.cc"
click node_stream_codec "https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/LogLite-B/src/compress/stream_compress.cc"
click node_file_io "https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/LogLite-B/src/common/file.cc"
click node_rle "https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/LogLite-B/src/common/rle.cc"
click node_xor "https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/LogLite-B/src/common/xor_string.cc"
click node_loglite_b "https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/LogLite-b/src/compress/stream_compress.cc"
click node_zstd_dict "https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/LogLite-b/src/additional/linetest-zstd.cpp"
click node_fsst "https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/fsst/fsst.cpp"
click node_pbc_train "https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/pbc/src/train/pbc_train.cc"
click node_pbc_codec "https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/pbc/src/compress/compress.cc"
click node_loggrep_l "https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/loggrep-L/compression/main.cpp"
click node_loggrep_z "https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/loggrep-Z/compression/main.cpp"
click node_logreducer "https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/logreducer/main.cpp"
click node_logshrink "https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/logshrink/python_compression/parser/main.cpp"
click node_lzbench "https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/lzbench/_lzbench/lzbench.cpp"
click node_zstd "https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/loggrep-Z/zstd-dev/lib/compress/zstd_compress.c"
click node_lzma "https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/loggrep-L/compression/LZMA/LzmaLib.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_lite_cli,node_stream_codec,node_file_io,node_rle,node_xor,node_loglite_b,node_zstd_dict,node_user toneBlue
class node_fsst,node_pbc_train,node_pbc_codec toneAmber
class node_loggrep_l,node_loggrep_z,node_logreducer,node_logshrink toneMint
class node_lzbench,node_zstd,node_lzma toneRose
```

## Components

### LogLite compressors

- [LogLite CLI](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/LogLite-B/src/tools/xorc-cli.cc): `LogLite-B/src/tools/xorc-cli.cc`
- [Stream codec](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/LogLite-B/src/compress/stream_compress.cc): `LogLite-B/src/compress/stream_compress.cc`
- [File handling](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/LogLite-B/src/common/file.cc): `LogLite-B/src/common/file.cc`
- [RLE helper](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/LogLite-B/src/common/rle.cc): `LogLite-B/src/common/rle.cc`
- [XOR strings](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/LogLite-B/src/common/xor_string.cc): `LogLite-B/src/common/xor_string.cc`
- [LogLite-b variant](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/LogLite-b/src/compress/stream_compress.cc): `LogLite-b/src/compress/stream_compress.cc`
- [Zstd dictionary test](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/LogLite-b/src/additional/linetest-zstd.cpp): `LogLite-b/src/additional/linetest-zstd.cpp`

### Compression baselines

- [FSST codec](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/fsst/fsst.cpp): `baselines/fsst/fsst.cpp`
- [PBC training](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/pbc/src/train/pbc_train.cc): `baselines/pbc/src/train/pbc_train.cc`
- [PBC codec](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/pbc/src/compress/compress.cc): `baselines/pbc/src/compress/compress.cc`

### Log parsing baselines

- [LogGrep-L compression](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/loggrep-L/compression/main.cpp): `baselines/loggrep-L/compression/main.cpp`
- [LogGrep-Z compression](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/loggrep-Z/compression/main.cpp): `baselines/loggrep-Z/compression/main.cpp`
- [LogReducer](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/logreducer/main.cpp): `baselines/logreducer/main.cpp`
- [LogShrink parser](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/logshrink/python_compression/parser/main.cpp): `baselines/logshrink/python_compression/parser/main.cpp`

### General compressors

- [LZBench codecs](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/lzbench/_lzbench/lzbench.cpp): `baselines/lzbench/_lzbench/lzbench.cpp`
- [Zstd implementation](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/loggrep-Z/zstd-dev/lib/compress/zstd_compress.c): `baselines/loggrep-Z/zstd-dev/lib/compress/zstd_compress.c`
- [LZMA implementation](https://github.com/efficient-data-systems-lab-gzhu/loglite/blob/master/baselines/loggrep-L/compression/LZMA/LzmaLib.h): `baselines/loggrep-L/compression/LZMA/LzmaLib.h`

### Other components

- **CLI user**

## Connections

- CLI user → LogLite CLI: selects mode
- LogLite CLI → Stream codec: compresses or decompresses
- LogLite CLI → File handling: reads and writes files
- LogLite CLI → RLE helper
- LogLite CLI → XOR strings
- CLI user → LogLite-b variant: runs line compression
- CLI user → Zstd dictionary test: runs dictionary test
- CLI user → FSST codec: runs line baseline
- CLI user → PBC training: trains patterns
- CLI user → PBC codec: compresses logs
- CLI user → LogGrep-L compression: runs baseline
- CLI user → LogGrep-Z compression: runs baseline
- CLI user → LogReducer: trains and compresses
- CLI user → LogShrink parser: runs parser
- CLI user → LZBench codecs: selects codecs
- LZBench codecs → Zstd implementation: uses codec
- LZBench codecs → LZMA implementation: uses codec
