AnemoneLabs / unmessage

Privacy enhanced instant messenger
GNU General Public License v3.0
42 stars 7 forks source link

Send files without JSON serialization #65

Open felipedau opened 7 years ago

felipedau commented 7 years ago

The work in #12 allows unMessage to send files the same way that all information is sent: JSON serialized Elements. Although it makes file transfers possible, it is inefficient as the serialization almost doubles the size of a file. Once #64 is implemented, unMessage should be able to efficiently send information as bytes and the file manager should use this new feature.

felipedau commented 6 years ago

89 enables unMessage to send files bigger than 50KB. I would like to

mention that the inefficiency of the file-transfer is not only due to the JSON serialization of the elements. It is also due to the serialization of the packets. Both the file (plaintext) and the packet (ciphertext) grow by 33% each. This results in the transmission of 80% more data than the initial size of the file.

Here are some tests I made with random files:

(Those are the real size of the files. The actual data that was transmitted is size * 1.8.)