file-format

Parsing jpeg file, SOS marker

允我心安 提交于 2019-12-07 02:35:37
问题 I'm having problem with parsing jpeg file. When I hit SOS (start of scan) marker, there are few bytes which meaning I don't understand. In picture bellow, after SOS marker, there are 2 bytes for header length (Ls part on the picture). But what the rest of data on picture mean (for example Ns, Cs1 etc....), and where the pure data starts? 回答1: Cs1 is a components selection index, This refers back to the SOF section (where horizontal and vertical sampling factors are specified) Td1 is the DC

What is the iDOT chunk

时光总嘲笑我的痴心妄想 提交于 2019-12-07 01:37:07
问题 Looking at a screenshot I took on a MacBook Pro with Retina display and running OS X 10.11, I found that it contained these chunks: IHDR, iCCP, pHYs, iTXt, iDOT, IDAT…, IEND All of these are part of the 2003 spec, except for iDOT which is a small (28 bytes) chunk. According to the chunk naming conventions, the fact that its second letter is capital should indicate that it's a chunk with a public specification. I couldn't find its specification anywhere yet though. It's not listed in the

Packing a file into an ELF executable

别说谁变了你拦得住时间么 提交于 2019-12-07 01:34:09
问题 I'm currently looking for a way to add data to an already compiled ELF executable, i.e. embedding a file into the executable without recompiling it. I could easily do that by using cat myexe mydata > myexe_with_mydata , but I couldn't access the data from the executable because I don't know the size of the original executable. Does anyone have an idea of how I could implement this ? I thought of adding a section to the executable or using a special marker ( 0xBADBEEFC0FFEE for example) to

What are the binary storage formats for sqflt8, sqlmoney and other native SQL data types?

﹥>﹥吖頭↗ 提交于 2019-12-06 22:24:33
问题 According to the documentation, native (binary) data can be imported or exported with bcp formatted in the native SQL Server data formats. Examples of these are SQLFLT8, SQLFLT4, SQLMONEY or SQLNUMERIC. Does anyone know either what the data formats for the various types are, or where documentation specifying these formats might be found. For example, is a SQLFLT8 stored as an IEEE double precision number or in some other format? Edit: From the answers by kevchadders and Andrew I had a little

Which is the best library to parse Excel files in PHP? [duplicate]

送分小仙女□ 提交于 2019-12-06 21:06:35
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Alternative for PHP_excel I've found a number of PHP libraries for reading and parsing Excel files, such as PHPExcel and PHP-Excel-Reader. Are there any other ones, and which is the best (i.e. the most robust, most update-to-date, etc.)? 回答1: Definition of which is the best is very subjective... I have a vested interest when I say that PHPExcel is the best, because I'm the main developer. However: very few of

Which file formats can be previewed on CKAN Data Preview tool?

时间秒杀一切 提交于 2019-12-06 11:56:15
问题 I am working on CKAN and will like to know the appropriate file formats that can be previewed on CKAN. I could not find any information on this topic online, so I decided to start this topic and hope to garner more responses on this which will be useful to CKAN developers in future. Here's a list of file formats that I have gathered after experimenting with my own CKAN and looking through other CKAN instances such as those from UK and Australia. Can be previewed: CSV (Comma separated values)

Parsing the Hershey font format

痞子三分冷 提交于 2019-12-06 11:06:43
Hershey is a text-based vectorial font format defined here: http://paulbourke.net/dataformats/hershey/ The structure is bascially as follows: each character consists of a number 1->4000 (not all used) in column 0:4, the number of vertices in columns 5:7, the left hand position in column 8, the right hand position in column 9, and finally the vertices in single character pairs. All coordinates are given relative to the ascii value of 'R'. If the coordinate value is " R" that indicates a pen up operation. I don't understand how to parse this format. For example for the character '3': 3

How to know file type without extension

风流意气都作罢 提交于 2019-12-06 09:23:57
While trying to come-up with a servlet based application to read files and manipulate them (image type conversion) here is a question that came up to me: Is it possible to inspect a file content and know the filetype? Is there a standard that specifies that each file MUST provide some type of marker in their content so that the application will not have to rely on the file extension constraints? Consider an application scenario: I am creating an application that will be able to convert different file formats to a set of output formats. Say user uploads an PDF, my application can suggest that

Does SQLite have a machine portable file format that the C API can read/write?

北战南征 提交于 2019-12-06 07:58:33
问题 I've tried passing binary SQLite DBs over the network between different OSes and architectures - it didn't work. What format are you all using? I've tried an unholy hack of copying SQLite's shell.c and calling shell_main() with a hacked up argc, argv, stdin with success on Mac. Pity I'm developing for the iPhone and it fails only there. Does everyone do such awful things? 回答1: This is one of the core features of SQLite. Stable Cross-Platform Database File The SQLite file format is cross

How to recognize an image file format using its contents?

ぃ、小莉子 提交于 2019-12-06 05:30:56
If a Image file is of format .png then it will contain ‰PNG , at the beginning of the file. (when read in Text mode) If a Image file is of format .bmp then it will contain BM , at the beginning of the file. (when read in Text mode) I know that Image formats contain text (data) of certain size (bytes) in the beginning of the file, which is used as metadata of the Image file? My Questions are:- Is this behavior same in all image file formats (or formats in general)? Could a image file ( of no extension ) be recognized just using this data? Is there information available on how this metadata is