Is there a way to figure out what version of Xilinx was used to create a bitfile from looking at the bitfile? - xilinx

Is there a way to figure out what version of Xilinx was used to generate a bitfile just by looking in the bitfile? I've opened the bitfile in a hex editor, and only see the project name, date, and fpga model. See below.
Thanks!

Impossible, though this is not official: http://home.earthlink.net/~davesullins/software/bitinfo.html its README contains the following chunk.
Bitinfo is a simple utility that parses the header of a Xilinx bit file
and outputs all the information that can be obtained from that header.
This information includes the Xilinx FPGA the bit file was created for,
the NCD file the bit file was created from, the creation date and time,
and the bitstream length.
I guess you have to fallback on wildguess based on date/time. Good luck.

Related

Is there a way to find file type?

I would like to get the type of a file without using the extension, is there a way to use the metadata of a file to distinguish if it is a video file or if it isnt?
I have tried using extensions but I find searching each file extension and comparing it with a list of extensions is quite time consuming.
Yes it is possible to determine file type without using the file extension. You can do this by reading the file header also sometimes referred as file signature which occupies first few bytes of the file.
How many bytes do file header/signature occupy? This depends from file type to file type. So you should check the internet for more detailed information about the file header/signature for specific file type you want to identify.
You can find list of some more popular signatures List of file signatures - Wikipedia
PS: Most program stopped relying only on file signatures for determining file way back when first Windows came out. The main reason for this was the fact that since in the beginning file extensions were limited to three character length (limit of the old file systems like old FAT8 or FAT16) world quickly ran out of possible file extensions so multiple programs began to use same file extensions but used completely different file types. So by storing file header/signature at the beginning of the file you would no longer be limited by this file system limitation.

Obtain the HDF5 file format version of a file

Given a certain HDF5 file (HDF5 format), how can I know the version of the file format that has been used for its creation?
Context. It is said in the documentation that when you create/write a file the library the following applies for backward compatibility:
An HDF5 Library of any given release is designed to read all existing
HDF5 files from that or any prior release. Although major versions
sometimes contain features that require additions and/or changes to
the HDF5 file format, the library will by default write out files that
conform to a maximum compatibility principle. That is, files are
written with the earliest version of the file format that describes
the information, rather than always using the latest version possible.
This provides the best forward compatibility by allowing the maximum
number of older versions of the library to read new files.
I have tried tools like h5stat but it does not output the info that I want.
Thank you.
Here is an answer in the last question https://ftp.hdfgroup.org/hdf5-quest.html#h5dumpvers
Q: Can you add an option to h5dump or h5ls to print the version of a file ?
A: No, we do not plan on adding this option. Users should use attributes to specify the version of a file. There are many reasons why we shouldn't add this. For example, different objects in the file could be created or modified by different versions of the library.

How can I update a file incrementally in iOS. (File patching)

I have a huge text file in my application (version 1.0).
Lets assume that a new version (2.0) of this file was just released.
Most of the file remained the same but the new (2.0) version has a few modifications (some lines removed, others added).
I now wish to update the file (1.0) to the new version (2.0), but do not wish to download the whole file again.
I would love to just patch the file with the changes of the new file, thus saving bandwith from downloading the WHOLE new file from my server.
(Similar to the way versioning systems like git or svn act)
How can I do this programmatically? Are there any iOS libraries available?
Thank you
You need to implement some kind of Binary delta compression such as zdelta, or Remote Differential Compression such as the one in rsync.
Personally I'm not aware of such algorithm implemented specifically for iOS, but I'm sure it's possible to find one that is implemented in C/C++ which can be seamlessly used in the iOS environment.
Edit: I also recommend you to read this.
It's actually a big problem... if your API let you ask the data of a file in a specific range, you can just a ask the data range that you need to replace, and seek the file at the range and overwrite the specific data... this mean that you have to take trace about the changes every time you update the files... and your app update has to know the ranges to request... this is not a solution... I hope will be a start point to implement your own solution
to try to get partial conent in a range you need to add to your request header something like this:
Range: bytes=0-999
I think, you can do this by yourself without third party libraries. To achieve this, all you need is 1)Piece of code which will generate the metadata for joining versions of your file (offsets, lengths, and pointers to the data to be changed in older version); 2)piece of code which will do the hard work: read meta and put the parts on right places. Several days of struggling with offsets, and you are done ;) Good luck!

Phonegap iOS-plugin to decode and store base64-encoded file strings

Hello stackoverflow community..
Currently I'm developing a Crossplatform-App (android/iOS) which generates beside its other features pdf-files from user-content.
This works well with the help of jsPDF.
The output of this awesome library is an base64 encoded string of the binary PDF-File.
(see this issue of the creator about the 'binaryness' of pdf files under different circumstances on github).
Now my actual problem:
I need to save this base64 as a proper decoded binary file for further usage on different aspects of the system (mailing it, printing it, a.s.o.).
For Android there is a Plugin that does a similar thing with images. My current plan is to modify and publish it as a more generic plugin for saving base64 encoded to a file.
Problem is now, I cannot find a similar code for iOS, and since I have literally no experience in Objective-C (plenty of Java, ruby, javascript and c though), I'm not able to produce such a plugin in short time.
Do you guys know a plugin of this kind, which can be modified with little Objective-C knowledge.
Perhaps there is someone interested in developing this kind of plugin and we cut could a deal (the project I'm working on is commercial)
Hope to hear some interesting responses, because I'm running out of ideas here :D
Greetings
Jakob

BlackBerry - Unpack Zip File

I'm developing a BlackBerry application in which I need to unpack a zip file compressed with PKZIP. The package could have one file in it, or it could have 10; it will vary in each case. I know that the BlackBerry API has native support for GZip and Zlib, although I'm pretty sure that these methods aren't going to be helpful in my case. It doesn't look as if I can extract the individual files using these calls.
I've tried JZlib (http://www.jcraft.com/jzlib/), which compiled fine, but again it doesn't look as if the methods contained therein are going to allow me to pull the individual files.
It appears as if this is possible, as there's an application called Ziplorer (http://www.s4bb.com/software/ziplorer/) that claims to do perform this exact procedure. How they're doing it, however, escapes me.
So here I am after hours of Googling. I'm welcoming any insight into my problem with open arms.
"zip" algorithms are typically offshoots of the Lempel-Ziv-Welch algorithm. They are a fairly efficient stream compression algorithms, but because of how they function, you can't start to decompress at random points in the file, you have to start from the start.
Any product that claims to be able to decompress one file from a zip still has to decompress everything before it in the zip file in order to know how to decrypt the given file, or even, for that matter, where the file is in the archive.
If you can tolerate GPL code in your application, then this library http://jazzme.sourceforge.net/ that might work. However the project (and its parent project http://sourceforge.net/projects/jazzlib/) don't look like they're being developed.

Resources