- Create a function to open and read a file
- Implement error handling for file operations
- [-] Add basic tests for file handling
- Implement basic command-line argument parsing
- Implement a function to convert bytes to hex representation
- Create a basic hexdump of file contents (hex only)
- Add ASCII representation alongside hex output
- Implement address counting in the output
- Format output to match xxd's default format:
00000000: 7f45 4c46 0201 0100 0000 0000 0000 0000 .ELF............
- Add tests for hex conversion and formatting
- Implement
-l
length option to limit output - Add
-s
option for starting offset - Implement
-c
option to control bytes per line - [-] Add unit tests for each option
- Implement binary file input (
-b
option) - Add reverse operation (
-r
option) to convert hex dump back to binary - Implement plain hexdump (
-p
option) - Add option for uppercase hex (
-u
) - Implement grouping options (
-g
for octet grouping)
- Add support for reading from stdin when no file is specified
- Implement proper handling of pipes and redirections
- Add support for writing to stdout or files
- Optimize memory usage for large files
- Implement buffered reading for better performance
- Add benchmarking tests
- Compare performance with original xxd
- Write comprehensive documentation
- Create a man page
- Add usage examples
- Implement
--help
with detailed option descriptions
- Add color output option
- Implement autosense feature for intelligent output formatting
- Add option to output in C array format
- Consider adding unique features not in original xxd
- Focus on one section at a time
- Each feature should have corresponding tests
- Use
zig test
to ensure functionality - Compare output with original xxd for compatibility
- Original xxd source code for reference
- Zig documentation for file I/O and string manipulation
- Hexdump format specifications
- Research and choose a TUI library (e.g., zig-ncurses, zig-termbox)
- Set up basic window management
- Implement status bar
- Create basic event loop
- Handle window resize events
- Add quit functionality
- Create hex view layout (address + hex + ASCII)
- Implement scrolling functionality
- Add line numbers/addresses
- Support different window sizes
- Handle files larger than screen size
- Implement syntax highlighting for different sections
- Add cursor movement (arrows, hjkl)
- Implement page up/down
- Add jump to address functionality
- Create search functionality (hex/ASCII)
- Implement mouse support (if desired)
- Add bookmarks for positions
- Implement insert mode for hex editing
- Add ASCII editing mode
- Support undo/redo operations
- Add cut/copy/paste in hex format
- Implement byte insertion/deletion
- Add block operations (fill, copy, move)
- Integrate file loading from xxd implementation
- Add file saving functionality
- Implement backup creation
- Add save-as functionality
- Support for creating new files
- Add read-only mode
- Add split view (hex/decoded)
- Implement data inspector (common formats)
- Add binary template support
- Create pattern matching/highlighting
- Support for different encodings
- Add hex calculator
- Add command line (like vim)
- Create context-sensitive help
- Implement status messages
- Add configuration file support
- Create custom color schemes
- Add different view modes (byte, word, dword)
- Add entropy visualization
- Implement pattern recognition
- Add data statistics
- Create hex comparison tool
- Support for checksums/hashing
- Add file format detection
- Implement efficient buffer management
- Add memory mapped file support
- Optimize screen updates
- Add background processing for large files
- Implement partial file loading
- Add caching for viewed regions
- Add plugin system
- Create macro recording/playback
- Add remote file editing
- Implement collaborative editing
- Add session management
- Create export/import functionality
- Reuse code from xxd implementation where possible
- Focus on vim-like keybindings for familiarity
- Maintain high performance with large files
- Keep the interface intuitive for both hex and ASCII editing
- Documentation for chosen TUI library
- Existing hex editors for inspiration (hexcurse, hexyl)
- File format specifications
- Unicode specification for character display