All posts

Transfers that survive a dropped connection

We pulled the plug on a 1 GB transfer three times, and it still arrived identical, byte for byte. Here is how.

Anyone who has sent a large file over Wi-Fi knows the feeling: 90% done, the link drops, and you start again from zero. DeskGo is built so an interruption costs only the piece that was in flight.

Pieces, each with a fingerprint

Every file is split into pieces, and each piece is fingerprinted with BLAKE3, a fast cryptographic hash. The receiving computer checks each piece’s fingerprint when it arrives, and checks one fingerprint for the whole file at the end. If a single bit is wrong, you find out.

Save first, then record

The receiving computer keeps a record of which pieces it has. The order in which it updates that record is the whole trick:

  1. Write the piece to disk.
  2. Make sure Windows has really saved it, not just held it in memory.
  3. Only then mark the piece as done.

If the power fails between steps, the record may say a piece is missing when it is actually saved, which costs one piece sent twice. It can never say a piece is saved when it isn’t, because that would leave a hole in your file.

Picking up where it stopped

When the two computers reconnect, they compare records and only the missing pieces are sent. If the original file was changed in the meantime, DeskGo notices and stops rather than stitching half of the old version to half of the new. Send the file again to get the new version.

Tested the hard way

Our test suite includes a tool that deliberately cuts the connection in the middle of a transfer. In one run, a 1 GB file survived three forced disconnections and arrived with a fingerprint identical to the original.

DeskGo also compresses on slow links and skips compression for files that are already compressed, like ZIP archives, videos and installers, where it would only waste time.

Keep reading

More from the blog

Reach any computer, on any network

DeskGo used to find the other computer by asking around the local network. Now it can reach a computer wherever it is, with no router settings and no way for us to read what passes through.