mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-27 17:41:40 +00:00
terminal: add compressed page representation
The standalone LZ4 codec had no representation for terminal page ownership or metadata, so PageList integration would otherwise need to reconstruct every Page field independently. Add compress.Page, which embeds the complete terminal Page while retaining its original virtual mapping and owns only an exact-sized encoded block. Compression is kept only when the encoded state is strictly smaller, and scratch output is capped at that profitability boundary so a future PageList caller can borrow a standard pool item. Extend the page-compression benchmark with a store mode that measures the encoded copy, allocation, bounded retention, and eviction path. Nothing uses compression from PageList yet; this remains isolated groundwork.
This commit is contained in:
@@ -83,7 +83,7 @@ test {
|
||||
|
||||
// Internals
|
||||
_ = @import("bitmap_allocator.zig");
|
||||
_ = @import("compress/lz4.zig");
|
||||
_ = @import("compress.zig");
|
||||
_ = @import("hash_map.zig");
|
||||
_ = @import("ref_counted_set.zig");
|
||||
_ = @import("size.zig");
|
||||
|
||||
Reference in New Issue
Block a user