Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3758410
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:09:27+00:00 2026-05-19T10:09:27+00:00

If my FTP client intends to upload files over 4 gigs in size, assuming

  • 0

If my FTP client intends to upload files over 4 gigs in size, assuming I’m streaming the data, my pointer is going to hit the wall at around 4 gigs, if it’s a 32 bit pointer, right? I’m trying to imagine what’s going on behind the scenes and am not able to visualize how this could work… however it MUST work, since I have downloaded files larger than this in the past.

So, my question is two fold… what happens on the client (and does it need to be a 64 bit client, on a 64 bit machine) and what happens on the server (and does IT have to also be a 64 bit machine?)

I realize that the file will be broken into smaller files for transmission, but isn’t the program going to explode just trying to address the parts of the file beyond the 4,294,967,295 mark?

I think this is a related post, but I’m not sure what conclusion they come to. The answers seem to point both to the limitations of the pointer (in their case PERL) and the OS.
Why can't my Perl program create files over 4 GB on Windows?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T10:09:27+00:00Added an answer on May 19, 2026 at 10:09 am

    The client or server should read the data in chunks (I would do a multiple of the page size or something similar) and write the chunks to disk. There is no need to have the whole file in RAM all at once.

    Something like this psuedo code (error checking and similar omitted) on the receiving end:

    chunk = new byte[4096];
    while(int size = recv(socket, chunk, 4096)) {
        write(file, chunk, size);
    }
    

    So the above sample is for the server, the client would do something similar too.

    chunk = new byte[4096];
    while(int size = read(file, chunk, 4096)) {
        send(sock, chunk, size);
    }
    

    EDIT:

    To address your comment. One thing you have to keep in mind is that the offset in the file isn’t neccessarily 32-bit on a 32-bit system, it can be 64-bit since it is not actually a pointer, it is simply an offset from the beginning of the file. If the OS supports 64-bit offsets (and modern windows/linux/osx all do), then you don’t have to worry about it. As noted elsewhere, the filesystem the OS is trying to access is also a factor, but I figure if you have a file that is greater than 4GB, then it is clearly on a filesystem that supports it ;-).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm going to write an ftp client using .NET Framework. I want to upload
I'm looking for a FTP client that I can use to upload new files
I am able to have my application upload files via FTP using the FTPClient
Is there a command line FTP client where you can upload a whole directory?
i am doing small ftp client for recieving some big files from ftp. I
I wrote small FTP Client Applet which uploads files to FTP Server using Commons
I am using apache's FTP client to upload file to the ftp server. But
I'm trying to ftp a folder using the command line ftp client, but so
Hiya I am working on an FTP client, can someone tell me the difference
Does anybody know of a Windows FTP client with SOCKS support? I need it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.