file-format

C++ The compiler is changing the alignment of my structures. How can I prevent this?

烂漫一生 提交于 2019-12-21 20:46:04
问题 I am writing some code to read bitmap files. Here is the struct I am using to read the bitmap header. See also: https://msdn.microsoft.com/en-us/library/windows/desktop/dd183374(v=vs.85).aspx struct BITMAPFILEHEADER { WORD bfType; // 2 DWORD bfSize; // 6 WORD bfReserved1; // 8 WORD bfReserved2; // 10 DWORD bfOffBits; // 14 }; // should add to 14 bytes If I put the following code in my main function: std::cout << "BITMAPFILEHEADER: " << sizeof(BITMAPFILEHEADER) << std::endl; the program prints

JPEG EOF vs EOI marker

Deadly 提交于 2019-12-21 16:58:26
问题 The JPEG file signature states that the JPEG EOI (End of Image) marker is given by the final FF D9 . However I very occasionally come across JPEGs that also have a small amount of data following this EOI (in this example 02 24 ... ): FF D8 FF E1 ... ... FF D9 02 24 02 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48 00 00 00 00 00 00 00 00 00 00 00 00 27 10 00 00 00 00 00 00 00 00 27 10 00 00 00 00 27 10 00 00 27 10 00 00 00 00 00 00 00 00 27 10 00 00 00 00 00 00 00 00 00 00 00 00 00

Is it legal to reverse engineer binary file formats [closed]

浪子不回头ぞ 提交于 2019-12-21 07:12:09
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . Is it legal to add support for a 3rd party file format in my application by reverse engineer a unencrypted binary file format from another application, and reading the contents? 回答1: Depends on your location. In the EU it is specifically permitted (article 6 EU software convention) to "reverse engineer file

Is there an unofficial Flash .FLA spec?

独自空忆成欢 提交于 2019-12-21 02:36:11
问题 Is there an unofficial spec anywhere that explains how to reverse engineer a Flash .FLA file? I'm specifically interested in creating an application that can "auto-scene plan" a Flash document programmatically, pulling in content from other files, arranging that content into layers, without needing the Flash IDE open. Animators would then be able to take these pre-assembled FLA's and begin animating them. I've already built a JSFL script that does this, but it runs very slowly, is difficult

Decoding ima4 audio format

て烟熏妆下的殇ゞ 提交于 2019-12-20 20:19:21
问题 To reduce the download size of an iPhone application I'm compressing some audio files. Specifically I'm using afconvert on the command line to change .wav format to .caf format w/ ima4 compression. I've read this (wooji-juice.com) awesome post about this exact topic. I'm having trouble w/ the "decoding ima4 packets" step. I've looked at their sample code and I'm stuck. Please help w/ some pseudo code or sample code that can guide me in the right direction. Thanks! Additional info : Here is

SQLite or flat text file?

你。 提交于 2019-12-20 12:39:06
问题 I process a lot of text/data that I exchange between Python, R, and sometimes Matlab. My go-to is the flat text file, but also use SQLite occasionally to store the data and access from each program (not Matlab yet though). I don't use GROUPBY, AVG, etc. in SQL as much as I do these operations in R, so I don't necessarily require the database operations. For such applications that requires exchanging data among programs to make use of available libraries in each language, is there a good rule

What are the disadvantages of using .Rdata files compared to HDF5 or netCDF?

隐身守侯 提交于 2019-12-18 10:50:49
问题 I have been asked to change a software that currently exports .Rdata files so that it exports in a 'platform independent binary format' such as HDF5 or netCDF. Two reasons were given: Rdata files can only be read by R binary information is stored differently depending on operating systems or architecture I also found that the "R Data import export manual" does not discuss Rdata files although it does discuss HDF5 and netCDF. A discussion on R-help suggests that .Rdata files are platform

PHPExcel File format or extension is not valid

▼魔方 西西 提交于 2019-12-18 08:48:20
问题 I'm using phpexcel for export my query in excel file; however after I created file(which is xslx format), I can not open my file in excel. It gives "the file format or extension is not valid. Verify that the file has not been corrupted and that the file extension matches the file format of the file" error. When I open the file in texteditor(mine is npp) I see my php file's css codes and some part of my html codes. My code is like that; if( ! empty($_POST['export'])){ $query = "SELECT * FROM

PHPExcel File format or extension is not valid

左心房为你撑大大i 提交于 2019-12-18 08:48:12
问题 I'm using phpexcel for export my query in excel file; however after I created file(which is xslx format), I can not open my file in excel. It gives "the file format or extension is not valid. Verify that the file has not been corrupted and that the file extension matches the file format of the file" error. When I open the file in texteditor(mine is npp) I see my php file's css codes and some part of my html codes. My code is like that; if( ! empty($_POST['export'])){ $query = "SELECT * FROM

Which format for small website images? GIF or PNG? [closed]

大憨熊 提交于 2019-12-17 16:13:53
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . When doing small icons, header graphics and the like for websites, is it better to use GIFs or PNGs? Obviously if transparency effects