psanford / wormhole-william

End-to-end encrypted file transfer. A magic wormhole CLI and API in Go (golang).
MIT License
1.08k stars 55 forks source link

Use int64 for filesize #13

Closed gnyman closed 4 years ago

gnyman commented 4 years ago

This is a quick attempt at making wormhole-william support files bigger than 2 GiB on 32 bit architectures.

I ran in to this limitation when trying to transfer a big file to a 32 bit host. The receiver only saw the file as ~2GIB and only downloaded the first 2GiB. These are the fixes I did to make it work.

I also created a simple test which sets things up to transfer a ~30 GiB file, this test fails on GOARCH=386 without the int64 fix.

My Golang is really rusty, so I'd appreciate any feedback :-)

psanford commented 4 years ago

Ugh. That was a dumb oversight on my part.

gnyman commented 4 years ago

Deprecated the fields as suggested and updated the references. The test succeeds, but if you change Line 288 in wormhole_test.go to use the old field it will fail as expected. Let me know if you have any other suggestions for improvements.

gnyman commented 4 years ago

any other feedback or do you think we could get this merged?

psanford commented 4 years ago

This looks great! Thank you for your contribution, I really appreciate it.