Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sealmove/hexalepis
Hex editor made efficient
https://github.com/sealmove/hexalepis
hex-editor
Last synced: 10 days ago
JSON representation
Hex editor made efficient
- Host: GitHub
- URL: https://github.com/sealmove/hexalepis
- Owner: sealmove
- License: mit
- Created: 2019-06-09T02:43:24.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-22T19:37:37.000Z (over 4 years ago)
- Last Synced: 2024-07-31T19:22:11.220Z (5 months ago)
- Topics: hex-editor
- Language: Nim
- Homepage:
- Size: 214 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-kaitai - hexalepis - Win/Unix gui+terminal, [tweak](https://www.chiark.greenend.org.uk/~sgtatham/tweak/btree.html) engine, .ksy visualization (Similar projects / tools / Hex Editors)
README
# Hexalepis
## Hex editor made efficient### Introduction
Hex editors need special optimizations (different from text editors) which are typically not implemented. This project was inspired by Simon Tatham's [article](https://www.chiark.greenend.org.uk/~sgtatham/tweak/btree.html) and is an effort to apply his ideas into a minimal but practical editor.### Time efficiency
| Operation | Complexity |
|---------- | ---------- |
| Replace | O(1) |
| Copy-paste | O(1) |
| Insert | O(log(n)) |
| Delete | O(log(n)) |
| Seek | O(log(n)) |
| Search | O(n) |
| Save | O(n) |### Space efficiency
The engine implements lazy file loading and copy-on-write; thus, memory usage is minimal (proportionally to changes).
Copy-paste is not an insertion operation! This means pasting the same block in multiple places does not increase memory usage proportionally to the block size. One could view this as a form of compression.*Simon Tatham created [tweak](https://www.chiark.greenend.org.uk/~sgtatham/tweak/) which is more of a proof-of-concept rather than a full-fledged hex editor.*
### Engine implementation progress
- [ ] Replace
- [ ] Copy-paste
- [ ] Insert
- [ ] Delete
- [x] Seek
- [ ] Search
- [ ] Save### Main goals
- [ ] Implement Simon Tatham's engine
- [ ] [Kaitai Struct](https://kaitai.io/) support### TUI goals
- [ ] Toggle ascii panel
- [ ] Mouse support
- [ ] Status bar
- [ ] Color themes (cycle at runtime)
- [ ] Configurable key bindings
- [x] Automatically-adjusting panel to fit console### Installation
* [Install Nim](https://nim-lang.org/install.html)
* Clone
* Compile (`nim c -d:release -o:hexalepis main`)
* Run `./hexalepis `### Key bindings
| Key | Action |
|----------------- | ------------------------- |
| ctrl+q | exit |
| ctrl+s | save (in-place) |
| u (or ctrl+z) | undo |
| ctrl+r | redo |
| esc | cancel |
| h, j, k, l (or arrows) | movement |
| home | go to beginning of line |
| end | go to end of line |
| pageup, pagedown | vertical scroll |
| [ ] | horizontal scroll |
| tab | change panel |
| m (in hex panel) | mark byte |