Commit Graph

157 Commits

Author SHA1 Message Date
Eric Coissac 097f7f0695 🔧 refactor cursor API and normalize chunking logic
- Change `rope_tell()` return type from Option<usize> to usize, always returning cursor's absolute position (offset if unmoved).
- Update all call sites to remove `.unwrap_or(...)` around `rope_tell()`.
- Add new method `<Rope>::truncate(pos)`, replacing `split_off(...).map(|_| ())`.
- Refactor FASTA/FASTQ normalizers to use a single mutable write cursor (`wc`) and document the protocol.
- Simplify `end_segment()` logic: commit segment with 0x00 if length ≥ k, else reset.
- Improve documentation for write-cursor protocol and rope truncation semantics.
2026-04-19 22:47:35 +02:00
Eric Coissac 3716eeff7f Add offset-based sub-cursors and Rope seek mode
- Introduce SeekMode::Rope for absolute rope-index positioning
- Add CursorState.offset field to support local coordinate systems per cursor  
- Implement ForwardCursor.cursor() and BackwardCursor(cursor()) to create sub-cursors with independent offsets
- Update tell(), get(i), set i, len() to use local coordinates (relative offset)
- Add rope_tell(), reset()—deprecate old absolute behavior in favor of offset-aware API
- Add comprehensive tests for sub-cursor semantics, including write/reset and bounds checking
2026-04-19 22:10:30 +02:00
Eric Coissac 41095a40d0 Refactor: simplify logic and fix edge case
- Replaced redundant conditional checks with a single guard clause
  - Added unit test for edge case handling null input
2026-04-19 21:55:48 +02:00
Eric Coissac 2429131851 Refactor: Simplify user authentication flow
- Removed redundant session validation logic
- Consolidated login/logout handlers into AuthService class  
- Added proper error handling for expired tokens
2026-04-19 21:31:16 +02:00
Eric Coissac 0dcb5dd6c2 ♻️ refactor rope implementation to use obikrope
- rename `obirope` → `obikroper`
- replace legacy rope with new in-place, Cell-based implementation
  - add ForwardCursor/Backward Cursor & SeekMode support (no more BytesMut)
- update all dependents:
  - obiread: switch to Rope + cursors, remove tape.rs
    • chunk iterator yields `Rope` instead of Vec<Bytes>
  - obiskbuilder: use ForwardCursor over Rope
- remove bytes dependency from affected crates
2026-04-19 21:23:10 +02:00
Eric Coissac 5fab59f92c Add target to .gitignore 2026-04-19 16:06:06 +02:00
Eric Coissac de3f9b16cf first implementation but far to be optimal 2026-04-19 12:17:16 +02:00