Based on:
http://ultra.ap.krakow.pl/~bar/DOC/ssh_backup.html
How to copy something (that does not need to be a file) to the host:
cat localfile | ssh target_address cat ">" remotefile
cat localfile | gzip -c -1 | ssh target_address cat “>” remotefile.gz
This was used in an ‘adb shell’, to copy /dev/block/mmcblk0 to my host.