file-format

How do I choose a good magic number for my file format?

不想你离开。 提交于 2019-12-12 07:44:27
问题 I am designing a binary file format from scratch, and I would like to include some magic bytes at the beginning so that it can be identified easily. How do I go about choosing which bytes? I am not aware of any central registry of magic numbers, so is it just a matter of picking something fairly random that isn't already identified by, say, the file command on a nearby UNIX box? 回答1: Stay away from super-short magic numbers. Just because you're designing a binary format doesn't mean you can't

How to parse a single TFrecord file

我们两清 提交于 2019-12-12 04:20:01
问题 To read tfrecords: reader = tf.TFRecordReader() _, serialized_example = reader.read(filename_queue) features = tf.parse_single_example(...) TFRecordReader reads examples from a file queue. But how to read a single example from a particular file synchronically (without a queue). like file_buf = tf.read_file(filename) serialized_example = get_train_example(file_buf) features = tf.parse_single_example(...) how to implement the get_train_example function 回答1: Not sure if this exactly what you're

PDF format. function of %-started sequence

柔情痞子 提交于 2019-12-12 01:52:22
问题 What is a function of hex sequence "25 E2 E3 CF D3", found at the beginning of some documents? It should be a comment as far as I understand, but it's content is not any meaningful text and the same sequence occurs in many documents. 回答1: It identifies the PDF file as containing binary data. From the freely available PDF Reference (section 7.5.2, p. 40): If a PDF file contains binary data, as most do (see 7.2, "Lexical Conventions"), the header line shall be immediately followed by a comment

set jar as default program for a file

做~自己de王妃 提交于 2019-12-12 01:15:47
问题 I want to open a specific file-format with my own jar file. That means: I want to double-click the test.bo2 file and that should open my java program and send the path of that file (maybe as command-line argument). Is something like that possible? At the moment I guess a .jar file is not a program, so is there a workaround to run a java file from a .exe or something like that? Any suggestions? And, to go a step further, how can I automatically set this on the first startup? 回答1: As you are

Parsing RealLegal's .PTX file format

僤鯓⒐⒋嵵緔 提交于 2019-12-11 12:36:55
问题 Anyone have experience parsing the RealLegal PTX file format? I'm interested in creating a Mac reader client for this proprietary format. The PTX file format is in wide use for storing court and deposition transcripts. 回答1: Given that it's proprietary you're probably unlikely to find any public specification of it. However, given also that they don't appear to have a Mac presence, perhaps it might be worth it to enter into a business relationship with RealLegal? Sounds like a great proposal

Tools for Feature Extraction from Binary Data of Images

隐身守侯 提交于 2019-12-11 05:52:28
问题 I am working on a project where I am have image files that have been malformed (fuzzed i.e their image data have been altered). These files when rendered on various platforms lead to warning/crash/pass report from the platform. I am trying to build a shield using unsupervised machine learning that will help me identify/classify these images as malicious or not. I have the binary data of these files, but I have no clue of what featureSet/patterns I can identify from this, because visually

What's the data format of Athena's .csv.metadata files?

纵然是瞬间 提交于 2019-12-11 04:25:01
问题 What's the data format of the .csv.metadata files written by Amazon Athena? Alongside the output file of every query there is a metadata file. It looks like it describes the schema of the result. I assume this is what Athena uses to create the ResultSet.ResultSetMetadata part of the response of GetQueryResults requests, and that it is somehow created by Hive or Presto. 2019-04-23 14:51:29 27 e7629796-9b91-476a-bfb7-2fe6c9595bce.csv 2019-04-23 14:51:29 56 e7629796-9b91-476a-bfb7-2fe6c9595bce

Want to open downloaded file in appropriate application in Android

…衆ロ難τιáo~ 提交于 2019-12-11 02:48:19
问题 I have to download a document from my server, to my app and save into a private folder. The document can be anything like .doc, .pdf, .docs, .jpg etc. Now, what I want is, after the download is completed, I show an Alert Dialog to open the document. When I click on the pen button then open that particular file in an appropriate application and if the app is not available, then show Dialog to download app. Give me some hint on this. Thanks in advance. 回答1: Try this way: Mails attachment open

Video Format that Works on Mobile Phones

泪湿孤枕 提交于 2019-12-10 19:36:44
问题 I looked on this SO question but I am not sure if this is the answer to my question or not. I want to be able to stream videos on a mobile web page. I want this page to be compatable with as many phones as I can. Smart phones are the most important, and I need it to work for: Android HTC (Many use Android, same compatibility?) iPhones Blackberries (newer brands, 5.0 or higher if need be, but possible as low as 4.0) Windows Phones The rest can be added to my "it would be nice if it worked on..

File format of CF10-jpg

梦想与她 提交于 2019-12-10 17:16:52
问题 While working on a tool that allows to exchange images of several third-party applications and thus creating individual "skins" for those applications, I have stumbled across a jpg-format about which I cannot seem to find any decent informations. When looking at it in a hex-editor, it starts with the tag "CF10". Searching the internet has only provided a tool that is able to handle these kind of files, without any additional informations. Does anyone have any further informations about this