Skip to main content
66 votes
Accepted

Why can FAT16 not store more than 2 GB?

FAT16 uses 16 bits to identify clusters. Thus there are a maximum of 65536 clusters before you run out of identifiers, and some identifiers are reserved for non-file uses. Each file occupies at least ...
Caleth's user avatar
  • 11.6k
55 votes
Accepted

What is the size of the number 65535 in bytes?

TL;DR The key takeaway here is that there is a world of difference between the number 65535 and a piece of text which represents the digits '6', '5', '5', '3' and '5'. It may look the same to you when ...
Flater's user avatar
  • 56.3k
12 votes

Why can FAT16 not store more than 2 GB?

There were actually several variants of "FAT16" over the years with different limits but lets consider the version that persisted from "compaq DOS 3.31" through to windows 95. FAT volumes are divided ...
Peter Green's user avatar
  • 2,317
9 votes

Share files between microservices

The goal in a microservice architecture is to reduce dependencies shared by multiple services, so that if, e.g. the FileService needs to change the file system or structure, other services are not ...
Avner Shahar-Kashtan's user avatar
8 votes

What is the size of the number 65535 in bytes?

There are likely several variables at play here, but 65535 is 5 characters. 1 byte per character = 5 bytes. Text editors don't have a notion of what a number is the same way that your code does, so ...
mmathis's user avatar
  • 5,508
7 votes
Accepted

How do different file types generally store data?

The reason there are many different file formats is that there are many different goals for the way data is formatted. Some of these are in opposition to each other and some are orthogonal to each ...
JimmyJames's user avatar
  • 28.9k
6 votes

What is the size of the number 65535 in bytes?

As Thomas Weller noted, you can use less than 2 bytes if you restrict the number of possible expressions that you want to convey. You could even use as little as one bit if you and your communication ...
Hans-Martin Mosner's user avatar
6 votes

What is the size of the number 65535 in bytes?

The reason the file contains 5 Bytes of information is because the text (String) '65535' that you typed in is five characters long. Each of those characters is very common, a digit, and is part of the ...
csstudent1418's user avatar
6 votes
Accepted

Is storing files of up to 50MB in size in a database for use by multiple servers a reasonable idea? Example inside

NO, don't store files in a relational database Trust me, I've learned this the hard way. One problem with applications that deal with files, is as they evolve, the users always want to store more than ...
TheCatWhisperer's user avatar
5 votes
Accepted

Is it safe to store application files to user's temp directory?

Direct answer Is it safe to store application files to user's temp directory? To the letter of your question, yes, it is safe. However, very much take the bolded part into account. Not just any ...
Flater's user avatar
  • 56.3k
4 votes

Creating associated resources before creating the main one in a REST setting

Perhaps you're documenting a visit to the radiologist, so in addition to pulse rate and blood pressure we're recording lots of giant X-ray images in lots of S3 image files. S3 has no efficient bulk ...
J_H's user avatar
  • 7,605
4 votes
Accepted

Saving and reading files in user specific application data in C or C++

I would heavily avoid any solution which uses chdir, since it is way too errorprone. It might interfer with other places in a codebase assuming the current directory wasn't changed (or worse - change ...
Doc Brown's user avatar
  • 214k
4 votes
Accepted

Strategies to shard local storage folders based on sequential key

Given you have ~30 million files in total, that means you need ~3000 directories. Therefore just do hash(filename) % 3000.
Philip Kendall's user avatar
3 votes

What is the size of the number 65535 in bytes?

A number is a mathematical concept which is not made of bytes. Bits or bytes only come into play when you want to represent (or encode) a number on a computer, and the amount of bits/bytes you need ...
Dmitry Grigoryev's user avatar
3 votes

Best way to store and fetch image bytes?

There's two issues in your problem statement: A cache is a subset of the larger data to server files that are accessed more frequently. You have to invalidate low hit rate cache entries or you will ...
Berin Loritsch's user avatar
3 votes

Is storing files of up to 50MB in size in a database for use by multiple servers a reasonable idea? Example inside

Obviously, you have some options but there are also trade-offs. To answer your questions: Is this a reasonable way to store files of this size for serving? The answer of that really depends on ...
Berin Loritsch's user avatar
3 votes

How do database storage engines handle new columns?

It Depends... If you are really interested in all of the possible ways find yourself a book on database engines, something like An Introduction to Database Systems The Dumb Way Treat every record ...
Kain0_0's user avatar
  • 16.3k
2 votes

When is the point where a JSON text file storage is not enough?

There is no point. Wow, talk about a "zen" answer. However, what I mean is that instead of a point, in reality you rather have a spectrum. Hard criteria Don't get me wrong, a hard criterium ...
R. Schmitz's user avatar
  • 2,608
2 votes

Does a replicated distributed file system minimise the need for durability?

Key value stores that don't persist to disk are generally billed as caches, implying there is another long-term durable storage your application manages somewhere else. If your data is important to ...
Karl Bielefeldt's user avatar
2 votes

In DDD, is it worth it to define a Bounded Context for file access?

As I understand it file management is not part of your business domain so a dedicated bounded context does not make sense from my opinion. I can somehow understand though that you don't feel ...
Andreas Hütter's user avatar
2 votes

What is the size of the number 65535 in bytes?

TL;DR: With typical representations, it can vary from 2 bytes to 14 bytes. You ask about the size of 65535 in bytes, and that depends on many factors. A byte is a unit of 8 bits, that's easy and ...
Ralf Kleberhoff's user avatar
2 votes
Accepted

Why does most software break or refuse to continue immediately if the folder where their data is stored is not available?

In C programming, we have this notion of undefined behavior. It means that, if you write code that creates situations that are not defined by the language standard, anything can happen. The program ...
Robert Harvey's user avatar
2 votes

Creating associated resources before creating the main one in a REST setting

I agree with J_H's answer, but there are several additional points I would like to make: It is implied that you will be storing meta data about the upload into another data store - someone can always ...
DavidT's user avatar
  • 4,273
2 votes

PHP secure storage for sensitive document uploads

Secure against what? If you're afraid someone is going to pull the HD and take it home then full disk encryption works (so long as you didn't leave the key lying around). If you're afraid someone is ...
candied_orange's user avatar
1 vote

What is the size of the number 65535 in bytes?

What is a byte? Let's assume the modern eight bits. What is the representation? What other values have to be possible in that representation? Suppose we assume a pure binary representation which can ...
Kaz's user avatar
  • 3,652
1 vote

File system for abstracting S3 object storage

You have a choice between sanity and robustness. The sanest way to do this is indeed to generate the unique ID. You then don't need to disturb S3 (or whatever) if, for example, you rename a file. The ...
Martin Kochanski's user avatar
1 vote

How could creating symlinks/aliases to files on S3 work, while still taking advantage of CDN optimizations?

User uploads file to your app and receives a unique URL which points to your app. User follows that url, your app receives the request, and responds with a 302 redirect to the CDN's shared file ...
Willem Renzema's user avatar
1 vote

Share files between microservices

In most situations this is a Bad Idea™. It breaks encapsulation, but much worse it opens you up to supply chain risk. That FileService API isn't guaranteed to function the sameway tomorrow. It might ...
Kain0_0's user avatar
  • 16.3k
1 vote

How to store legacy source texts snapshots with FTS (full text search) all through their history?

I would recommend using GIT anyway. not because its fast. not because it makes life easier not because you can make an actual timeline but because that data will rot in the file system as more and ...
Kain0_0's user avatar
  • 16.3k

Only top scored, non community-wiki answers of a minimum length are eligible