Closed zhongzc closed 3 months ago
This update introduces a new module puffin_manager
to the Puffin library, which provides enhanced capabilities for managing, reading, and writing Puffin files. It defines traits for creating readers and writers, handling data compression, and organizing file structures efficiently.
Files | Change Summary |
---|---|
src/puffin/src/lib.rs |
Introduced puffin_manager module to the library. |
src/puffin/src/puffin_manager.rs |
Added traits PuffinManager , PuffinWriter , and PuffinReader , and a struct PutOptions for compression options. |
sequenceDiagram
participant Client
participant PuffinManager
participant PuffinWriter
participant PuffinReader
Client->>+PuffinManager: create writer()
PuffinManager->>+PuffinWriter: initialize
PuffinWriter-->>-PuffinManager: writer instance
Client->>+PuffinWriter: put_blob(data, options)
PuffinWriter-->>-Client: confirmation
Client->>+PuffinWriter: finalize()
PuffinWriter-->>-Client: EOF
Client->>+PuffinManager: create reader()
PuffinManager->>+PuffinReader: initialize
PuffinReader-->>-PuffinManager: reader instance
Client->>+PuffinReader: read_blob(key)
PuffinReader-->>-Client: data
In the realm of Puffin's plume,
New managers and readers bloom,
Compression so tight,
Directory delight,
Libraries gain more room.
A cycle complete,
Writing and reading meet,
Efficiency, now our tune.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 84.81%. Comparing base (
07cbaba
) to head (1949510
).
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
4193
What's changed and what's your intention?
Add
PuffinManager
to unify puffin file reading and writing blob and directoryChecklist