Convert file to ASCII. Some transfer protocol only support ASCII. We can still use it by converting our file into ASCII.
- uuencode
- uudecode
- tar
- gzip
- gunzip
- Let's say that we have movie.mp4 file.
- Create arcive using tar and gzip
tar cfv mymovie.tar movie.mp4
gzip mymovie.tar
- Convert mymovie.tar.gz into ASCII
uuencode mymovie.tar.gz mymovie.tar.gz > mymovie.tar.uu
# You need to repeat file name twice!
- You will find mymovie.tar.gz.uu content to be like this
begin 664 mymovie.tar.gz
M4$L#!!0`"``(`(!F(54````````````````<`!``26YF;W1A:6YM96YT7U-L
M:61E<U]6,R`Q+FIP9U58#``!/1!C<#H08_4!%`"LNW54'%VS/CI8D`27)`3W
MP=W=!W>")H3@#,&#AQ#\10<&=V:`08,,[email protected]#!O<0-/@EGYSS?N?\[F^M
MN];MZ7]VU73OVM6UGWKVKN[[V?L5`)&:,D@9@(:&!DAY^`'NYP$*``QT]#_G
MPX'Y<&+A8&%A8F+A86,_PGF"]^3)8[S'C_$)2(CP"8@)'C\FHB`B)B4C)R=_
-
Now you can send it via email or MQTT or others protocol that support text(ASCII).
-
So you save the message in a file, complete with headers. Let's say you call this message-file.
uudecode message-file
gunzip mymovie.tar.gz
tar xfv mymovie.tar