2565d84 created the issue
When attempting to download more than 2147483648 bytes (Around 2 GB) Cyberduck gives the following error:
SSH Error:
A badly formatted packet or other SFTP protocol incompatibility was detected.
I believe that using an integer type that has a significantly larger capacity (such as a long) for the counter would solve this problem.