Questions tagged [file-format]

A file format is a particular way that information is encoded for storage in a computer file.

https://en.wikipedia.org/wiki/File_format

896 questions
232
votes
7 answers

Can a CSV file have a comment?

Is there any official way to allow a CSV formatted file to allow comments, either on its own line OR at the end of a line? I tried checking wikipedia on this and also RFC 4180 but both do not mention anything which leads me to believe that it's not…
Pure.Krome
  • 78,923
  • 102
  • 356
  • 586
104
votes
11 answers

What is the difference between "JPG" / "JPEG" / "PNG" / "BMP" / "GIF" / "TIFF" Image?

I have seen many types of image extensions but have never understood the real differences between them. Are there any links out there that clearly explain their differences? Are there standards to consider when choosing a particular type of image to…
MOZILLA
  • 5,660
  • 13
  • 49
  • 58
83
votes
9 answers

Write a file in UTF-8 using FileWriter (Java)?

I have the following code however, I want it to write as a UTF-8 file to handle foreign characters. Is there a way of doing this, is there some need to have a parameter? I would really appreciate your help with this. Thanks. try { …
user1280970
  • 831
  • 1
  • 6
  • 3
82
votes
8 answers

Tools to help reverse engineer binary file formats

What tools are available to aid in decoding unknown binary data formats? I know Hex Workshop and 010 Editor both support structures. These are okay to a limited extent for a known fixed format but get difficult to use with anything more complicated,…
Mat
  • 67,636
  • 33
  • 83
  • 106
79
votes
4 answers

What is the format of a patch file?

What does the following mean ? diff -rBNu src.orig/java/org/apache/nutch/analysis/NutchAnalysisConstants.java src/java/org/apache/nutch/analysis/NutchAnalysisConstants.java --- src.orig/java/org/apache/nutch/analysis/NutchAnalysisConstants.java…
omg
  • 123,990
  • 135
  • 275
  • 341
67
votes
11 answers

How do I distinguish between 'binary' and 'text' files?

Informally, most of us understand that there are 'binary' files (object files, images, movies, executables, proprietary document formats, etc) and 'text' files (source code, XML files, HTML files, email, etc). In general, you need to know the…
benno
  • 1,977
  • 1
  • 18
  • 23
67
votes
5 answers

Convert a shapefile (.shp) to xml/json

I'm working with a shapefile (.shp, .dbf, etc) and would like to convert it to xml. I'm on a mac, and I'm having trouble finding an application that will help me with the conversion. Does anyone know of a method for converting this file format into…
minimalpop
  • 6,718
  • 13
  • 64
  • 80
50
votes
4 answers

Preferred 3d model format of THREE.JS

What is the preferred 3d model format of THREE.JS which is widely used by 3d modelling softwares (can export to that format). I ask this, because I have my 3d models in an own unique format, and would like to use them in THREE.JS. While I could…
balazs
  • 5,294
  • 5
  • 32
  • 45
45
votes
10 answers

What are important points when designing a (binary) file format?

When designing a file format for recording binary data, what attributes would you think the format should have? So far, I've come up with the following important points: have some "magic bytes" at the beginning, to be able to recognize the files…
oliver
  • 5,451
  • 8
  • 41
  • 48
44
votes
4 answers

Why am I getting mime-type of .csv file as "application/octet-stream"?

I'm working on a PHP application that must import an excel file into MySQL. So I need to convert the excel file to .csv format. But when I want to get its type using $_FILE['something']['type'] , I get application/octet-stream as its mime-type; I…
Mohammad Saberi
  • 11,594
  • 23
  • 65
  • 123
36
votes
6 answers

Text file with 0D 0D 0A line breaks

A customer is sending me a .csv file where the line breaks are made up of the sequence 0xD 0xD 0xA. As far as I know line breaks are either 0xA from Mac or Unix or 0xD 0xA from Windows. Is the 0xD 0xD 0xA any known encoding? Is there any known…
Anders Abel
  • 64,109
  • 15
  • 143
  • 213
35
votes
17 answers

Which format for small website images? GIF or PNG?

When doing small icons, header graphics and the like for websites, is it better to use GIFs or PNGs? Obviously if transparency effects are required, then PNGs are definitely the way to go, and for larger, more photographic images I'd use JPEGs - …
David Heggie
  • 2,802
  • 1
  • 22
  • 20
33
votes
8 answers

What is the specifications for Motion JPEG?

I've been googling like mad and can't find any file format specifications for mjpeg. What should the header look like? Do i just append a series of jpegs after the header? I know it's the usually in the .avi container, does that have a…
Robert Sköld
  • 712
  • 2
  • 9
  • 19
31
votes
9 answers

Need to export fields containing linebreaks as a CSV from SQL Server

I'm running a query from SQL Server Management Studio 2005 that has an HTML file stored as a a string, e.g.: SELECT html FROM table This query displays in the "Results" window nicely, i.e., each row contains a string of the whole HTML file, with…
John Horton
  • 3,922
  • 6
  • 28
  • 43
29
votes
11 answers

Reading PSD file format

I wonder if this is even possible. I have an application that adds a context menu when you right click a file. It all works fine but here is what I'd like to do: If the file is a PSD then I want the program to extract the image. Is this possible to…
masfenix
  • 6,790
  • 9
  • 40
  • 58
1
2 3
59 60