qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] DMG chunk size independence
@ 2017-04-15  8:38 Ashijeet Acharya
  2017-04-17 20:29 ` John Snow
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Ashijeet Acharya @ 2017-04-15  8:38 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: Fam Zheng, John Snow, Kevin Wolf, Max Reitz, QEMU Developers

Hi,

Some of you are already aware but for the benefit of the open list,
this mail is regarding the task mentioned
Here -> http://wiki.qemu-project.org/ToDo/Block/DmgChunkSizeIndependence

I had a chat with Fam regarding this and he suggested a solution where
we fix the output buffer size to a max of say "64K" and keep inflating
until we reach the end of the input stream. We extract the required
data when we enter the desired range and discard the rest. Fam however
termed this as only a  "quick fix".

The ideal fix would obviously be if we can somehow predict the exact
location inside the compressed stream relative to the desired offset
in the output decompressed stream, such as a specific sector in a
chunk. Unfortunately this is not possible without doing a first pass
over the decompressed stream as answered on the zlib FAQ page
Here -> http://zlib.net/zlib_faq.html#faq28

AFAICT after reading the zran.c example in zlib, the above mentioned
ideal fix would ultimately lead us to decompress the whole chunk in
steps at least once to maintain an access point lookup table. This
solution is better if we get several random access requests over
different read requests, otherwise it ends up being equal to the fix
suggested by Fam plus some extra effort needed in building and
maintaining access points.

I have not explored the bzip2 compressed chunks yet but have naively
assumed that we will face the same situation there?

I would like the community's opinion on this and add their suggestions
if possible to give me some new thinking points.

Thanks
Ashijeet

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-04-25 10:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-15  8:38 [Qemu-devel] DMG chunk size independence Ashijeet Acharya
2017-04-17 20:29 ` John Snow
2017-04-18 10:21   ` Ashijeet Acharya
2017-04-18 17:05     ` John Snow
2017-04-18 17:43       ` Ashijeet Acharya
2017-04-23  9:03         ` Ashijeet Acharya
2017-04-24 21:19           ` John Snow
2017-04-25  5:20             ` Ashijeet Acharya
2017-04-25  9:50             ` Peter Wu
2017-04-18 10:29 ` Kevin Wolf
2017-04-25 10:48 ` Ashijeet Acharya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).