dinosaure / bob

A peer-to-peer file-transfer tool in OCaml
https://bob.osau.re/
MIT License
133 stars 4 forks source link

Add `--mime-type` argument and let Bob to recognise if it's valuable to compress or not the document #26

Closed dinosaure closed 1 year ago

dinosaure commented 1 year ago

@gasche explained a good idea to solve the initiale issue: how to let Bob to recognize when it should compress or not a document. We still don't want to introspect the given document and recognize its MIME type but we can let the user to give such information and, from that, decide to compress or not the document. An usage will be:

$ ./bob.com send --mime-type $(file --mime $FILE) $FILE

Internally, we will have a set of MIME types which should not be compressed (like images or videos).

dinosaure commented 1 year ago

Currently, the last version of Bob handles the option --mime-type and we consider video, image and audio as elements that we should not try to compress. We probably can do something smarter than that but it's an initial improvement.