Unzipping files in netduino - unzip

I'm working on a school project that involves unzipping files in a netduino.
Basicly I have to do an eBook reader. For the scope of the project I'll be using .ePub format wich is a free and standar e-Book format.
The e-Books will be loaded to de micro sd card. My major roadblock right now is that the ePub format consists in a zipfile with xhtml, css, and other metadata. This means that I have to unzip these files in the netduino.
Are there any lightweight unzip classes that might work in NETMF?

Related

How to create and modify .doc and .docx file in Qt?

I want to create and modify .doc and .docx file in Qt creator with ability to compile for Windows, Linux, Android and IOS.
This is not a Qt-specific question imho. Anyhow here is my answer:
Quoting wikipedia:
is a zipped, XML-based file format
What this means is you need to decompress (you need to figure out how it is compressed to begin with) and process the XML for doc files. Qt provides basic (de)compression facilities and does provide the tools to process XML data.
In terms of Qt Creator - you have to write your own plugin for that purpose. You can check what's already there - processing of CMake, C++, C, Python files.
You should use what's already there. LibreOffice for example, which is open source and free, can handle such documents (incl. doc). There are libraries that do that too. So your best bet is to integrate some library into your Qt application. I would NOT recommend implementing it yourself unless you have a lot of spare time. The fact that big projects such as LibreOffice, OpenOffice etc. still don't have 100% support for such documents should give a big enough hint that it's not a trivial task.

Opening/Editing Qt Resource File (.rcc)

I want to translate a program; but its language files (.qm) are in a .rcc file.
The program is not mine, so I haven't got any .qrc file.
Before asking this question, I have searched this site about this issue; but I don't attain anything.
Is there any way to extract/decompile it?
You can take my tool RccExtended - it based on the official Qt resource compiler with additional function to decompile binary resources.
Usage example:
cd \Path\To\MyQtResources\
rcc --reverse
Decompiler will unpack all .rcc files in the current directory, generate .qrc files and make.bat file to compile resources back to the binary format.
There isn't a supported way to decompile it as far as I'm aware, but it's a binary file format that can be read and handled. There's a nodejs example of how to read the file and extract PNGs on github: https://github.com/gcochard/png-extractor. It may be possible to extend that method out for the .qm files.
However there's other issues with attempting to add more translations to a Qt application without having the code, depending on the language you're attempting to add, how the developer has exposed the other languages etc.

How to get the epub from an acsm file?

I want to write a small linux tool that automates the download of eBooks. From my online library I can download an ACSM file. Now I need a step to automatically download the epub file. From what I've read this step is called fulfilment. The tool shall run on a headless server.
Right now I'm scripting wine and Adobe Digital Editions. But that is quite ugly and requires a graphical user interface. While this works fine on my PC, it doesn't work on a headless server.
Does anyone know a library that I could use?
Or a documentation of the fulfilment process so I could implement my own library?
In "PDF -Adobe Digital Edition" I saw a reference to the ADE_LauncherSDK_DevNet.pdf but I do not understand how to use this in an application.
Notes:
I do not want to remove the DRM, I just want to get the epub file.
The tool will be open source, so I do not want to buy anything from Adobe.
I know it's a 9 years old question but because I ended up on it with the exact same question, I wanted to give an answer.
Indeed, the code to download an epub/pdf from an acsm file can be found in 2 projects.
libgourou is a free implementation of Adobe's ADEPT protocol used to
add DRM on ePub/PDF files. It overcome the lacks of Adobe support for
Linux platforms.
https://indefero.soutade.fr//p/libgourou/
There is a docker version: https://github.com/bcliang/docker-libgourou/
Calibre ACSM Input plugin
This is a Calibre plugin that allows you to
turn ACSM files into EPUB or PDF files without the need for Adobe
Digital Editions. It is a full Python reimplementation of libgourou by
Grégory Soutadé (http://indefero.soutade.fr/p/libgourou/), and has
since been extended by more and more features.
https://github.com/Leseratte10/acsm-calibre-plugin
Calibre has a command line interface: https://manual.calibre-ebook.com/generated/en/cli-index.html

Open PDF file in Qt

I want to read a .PDF file in Qt. I placed my .PDF file in the resource(qrc) folder.
How can i read the PDF file from there? I want to load a PDF file on the click of a button.
Read your pdf file via QFile, resource access is done by prepending the path in the resource with a ":".
Qt does not natively support displaying PDF documents (it can export them using QPrinter though). You can do it through third-party libraries such as Poppler, see this Qt Quarterly edition on how to do it.
FWIW the resource access information is the docs, and the PDF stuff I got off Google in 30 seconds. I expect a bit more research effort for someone with 7K+ rep points.

Optimize loading an XAP file with an asp.net website

I've been developing a game using Silverlight 4 and silversprite (http://silversprite.codeplex.com/)
This game is HEAVILY content dependent, using a lot of audio and images. My content folder is around 90 mbs worth of stuff.
And because of that, my XAP file is around 60 MB, and takes 5 minutes to download from the website before any user can start playing.
I am using Visual Web Developer 2010 to create my site and load the XAP. Is there a way where I can take content out of my XAP and put it in my ASP.net site project? Or perhaps upload my content files to the site's storage?
This would make my XAP file much quicker to download.
Anyone have suggestions?
Thanks!
Yes, include in your XAP only content you need for the initial screen. Place other content you need in other XAPs (if you need to and understand the manifest xml) or just plain zip files would do. Perhaps a Zip for each "Level" or whatever.
You can download the Zip with WebClient and then use StreamResourceInfo and Application.GetResourceStream to access content in the zip file.
This blog although aging a little now still carries the basic idea and is still fundementally the current technique to use.
Absolutley its called Application Library Caching. Ive used it very successfully its now a standard operating procedure, particularly nice is its application with resource assemblies.
straight from msdn ...
Resource files are typically any non-executable data file used by your application, such as image, audio, and video files. A resource file can also have specific meanings in certain contexts. For example, in the context of application localization, resource files refer to .resx files, which you can deploy in localized satellite assemblies.
it continues with some really useful info
With Silverlight, you can deploy
resource files in the following ways:
•As individual files in the
application package.
•As individual files that you retrieve
on demand.
•As files embedded in an assembly in
the application package.
•As files embedded in an assembly in
an external library package.
•As files embedded in an assembly that
you retrieve on demand.
which is what is suggested in the other answer(s)

Resources