n0-computer / n0-computer/sendme

Feature request: Compression

Open
#79 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.2k
Forks
78
PR merge metrics
No merged PRs in 30d

Description

There doesn't seem to be any compression in sendme. Take, for example, a 1G file of zeroes:

$ dd if=/dev/zero of=empty bs=1G count=1
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.526697 s, 2.0 GB/s
$ sendme send empty
⠁ [00:00:00] waiting for requests
⠒ [00:00:00] waiting for requests
imported file empty, 1.00 GiB, hash 14fd9525cba83ddee5526775575b1680a509bc95eaf47b4b7814c036365e4cc9

If I receive this file on another machine, it takes the entire gigabyte to send. I can, of course, compress it myself:

$ gzip empty
$ sendme send empty.gz

...in which case it'll receive it much faster. However, fiddling with compression tools is a lot of added friction on receiving a file, and file transfer tools like sendme are (in my opinion) designed to solve friction.

It would be nice if sendme has optional compression (and if there are multiple compression algorithms, the ability to pick one, e.g. --compression zlib). Ideally it would let the user know when it's compressing a file, because it can take a long time for some files, and having no user feedback can make the user think it's stuck.

If compression is implemented, you should be able to turn it off (e.g. --compression none). A lot of file types are already compressed in some way, and extra compression will waste my time and CPU more than it would pay off.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or implementation entry points. Start by locating the code behind the sendme send command and its option definitions; done means optional compression, selectable algorithms, visible compression progress, and a way to disable it.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.