Crate calcbits

Crate calcbits 

Source
Expand description

calcbits — small utilities for working with downloaded binary data.

  • formatting helpers: to_hex, to_octal, to_decimal
  • timing helpers: average_time, time_exec
  • progress bar helper: create_progress_bar
  • async downloader with progress: download_with_progress
  • simple DB save/load helpers with progress: save_to_db, load_from_db

Functions§

average_time
Calculate the average of a slice of Duration. Returns None if empty.
create_progress_bar
Create a styled progress bar with ETA and speed display
download_with_progress
Async download with real-time progress, ETA, and speed Async download with real-time progress, ETA, and speed
load_from_db
Load a file from DB into out with progress
save_to_db
Save data to DB with optional quantum style and progress
time_exec
Time execution of a closure, returning (result, elapsed).
to_decimal
Convert a byte slice into a space-separated DECIMAL string.
to_hex
Convert a byte slice into a space-separated HEX string (uppercase).
to_octal
Convert a byte slice into a space-separated OCTAL string.