Files
CBZOptimizer/internal/manga/page.go
T
164dc577b9 refactor!: disk-first zero-copy architecture with file-to-file cwebp conversion
BREAKING CHANGE: Complete refactoring of the conversion pipeline.

- Replace in-memory Page/PageContainer with disk-based PageFile struct
- Extract archives to temp directory instead of loading into memory
- Use cwebp InputFile/OutputFile for zero-copy file-to-file conversion
- Use cwebp -crop for splitting (no Go-side image decode needed)
- Check if already converted before extracting (fast pre-check)
- Remove oliamb/cutter dependency (replaced by cwebp -crop)
- Remove page_container.go (no longer needed)
- Add comprehensive tests with improved coverage

Co-authored-by: Belphemur <197810+Belphemur@users.noreply.github.com>
2026-07-04 22:18:22 +00:00

17 lines
575 B
Go

package manga
// PageFile represents a single page image stored on disk.
// No image data is held in memory — only metadata and a file path.
type PageFile struct {
// Index of the page in the chapter (original ordering).
Index uint16
// Extension of the page image file (e.g., ".webp", ".jpg").
Extension string
// FilePath is the absolute path to the image file on disk.
FilePath string
// IsSplitted indicates whether this page was split from a larger image.
IsSplitted bool
// SplitPartIndex is the part index when the page was split.
SplitPartIndex uint16
}