Commit Graph
23 Commits
Author SHA1 Message Date
Lily Ballard 1619cd5afe Bump the buffer size to 256 bytes
On my machine this produces an 11% speedup (benchmarked reading a 1.3MB
file from disk). Higher buffer sizes don't seem to make a difference.
2019-01-13 17:35:51 +01:00
Lily Ballard 20694bb628 Write lines into an in-memory buffer before printing to stdout
Running them through an in-memory buffer first produces a 25% speedup
(when tested against a 1.3MB file).
2019-01-13 17:35:51 +01:00
sharkdp 98311282e5 Fix #25 2019-01-10 09:03:39 +01:00
Lily Ballard afb6669477 Replace all uses of format!()
Previously we were allocating 2 strings per byte, plus another for the
offset. Instead we can just write all this directly to stdout.

Also replace the calculation of the ANSI escape code for every single
byte. This produces a significant speedup.
2019-01-10 09:00:44 +01:00
sharkdp 3c3d91cd51 Use 8-bit colors instead of 24-bit truecolor 2019-01-10 08:32:27 +01:00
Lily Ballard 7b7a0ff32d Get rid of the use of str.repeat()
This allocates a string. Instead we can (ab)use format specifiers to do
the repetitions for us.
2019-01-10 07:56:42 +01:00
Sebastian Thiel 2e403a2d11 Make clear we didn't accidentally forget to handle Results 2019-01-09 23:41:29 +01:00
David Peter b5704f660c Change variable name 2018-12-02 20:41:11 +01:00
PewZ 648e96dbaf add COLOR_OFFSET 2018-12-02 20:41:11 +01:00
PewZ 91a119f453 display input offset 2018-12-02 20:41:11 +01:00
sharkdp 22b544393b Enable ANSI support on Windows, closes #2 2018-11-21 19:36:20 +01:00
sharkdp 784c714bde Fix clippy warning 2018-11-06 21:21:40 +01:00
sharkdp 5cc9e0b602 Add -n/--length option 2018-11-06 20:18:23 +01:00
sharkdp 3761508571 Fix grid 2018-11-05 23:53:54 +01:00
sharkdp ea3fc0caee Add help text 2018-11-05 23:23:06 +01:00
sharkdp 01860bcaf0 Possibility to read from stdin 2018-11-05 23:21:54 +01:00
sharkdp 4b7c44c207 Fix for empty files 2018-11-05 23:13:34 +01:00
sharkdp 94980a817e Add grid 2018-11-05 23:08:45 +01:00
sharkdp a1bd8fb873 Use more distinguished characters 2018-11-05 22:51:25 +01:00
sharkdp e4e6c6b323 Colors! 2018-11-05 22:40:43 +01:00
sharkdp 1443d2d7bb Fully-fledged HEX hexdump clone 2018-11-05 22:00:11 +01:00
sharkdp 6d6ee6fb24 Use a lock on stdout 2018-11-05 21:38:29 +01:00
sharkdp abd52ce7de Initial working version of a hex viewer 2018-11-05 21:30:39 +01:00