![]() |
#1 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 392
Karma: 1008414
Join Date: Jun 2011
Device: Kindle
|
Why does the file size get reduced so much?
I have a 32MB Retail mobi. It has no chapter markers, so I was gonna convert it in Calibre and add them in the process. It worked fine, but the resulting mobi was only 8MB!
To be sure I wasn't losing anything/quality, etc, I started with the source file again (32MB) and this time in Calibre I used the following settings, in an effort to keep as close to the original as possible: Disable font size rescaling (On) Keep ligatures (On) Remove first image (Off) Remove fake margins (Off) Do Not Convert All Images to jpeg (On) Disable Compression of file contents (On) But STILL the outputted mobi is 8MB! What's happening? Thanks |
![]() |
![]() |
![]() |
#2 |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,662
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
I suspect that the retail mobi didn't have text compression turned on and had lots of text.
You can use KindleUnpack to double-check that you're not losing anything, by unpacking each version and comparing. |
![]() |
![]() |
![]() |
#3 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 392
Karma: 1008414
Join Date: Jun 2011
Device: Kindle
|
Thanks. What would I compare? The HTML files? Wouldn't that take forever on a book with 11,000 location, and somewhat ruin the story, lol?
Am I right in saying the settings I chose above are the right ones to ensure maximum "closeness" to original? Why on Earth wouldn't the original manufacturer/publisher turn on text compression if the only effect is a smaller size, with no drawbacks? |
![]() |
![]() |
![]() |
#4 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 392
Karma: 1008414
Join Date: Jun 2011
Device: Kindle
|
Ok, I unpacked both, here's my findings:
The HTML for each is very similar in size; the 8MB book has an HTML file of 1,308,372 bytes and the 32MB book has an HTML file of 1,284,811, so both about 1.3MB. The 8MB book has an "images" folder with 128 items (size of folder 7MB). The 32MB "images" folder has 161 items (size of folder 31MB). The 32MB images are named from "image00300.jpeg" through to "image00460.jpeg". The 8MB images are named from "image00320.jpeg" through to "image00447.jpeg". The converted 8MB file, for some reason, is losing 20 files at the start and 13 at the end! Also, the remaining images don't "match up" - what WAS "image00319.jpeg" in the original 32MB book is now called "image00320.jpeg" in the new 8MB book, and it's changed from 29Kb to 6Kb (it's definitely the same image, it's a diagram of a crab). Similarly, what WAS "image00360" is now "image00322" and it's changed from 308Kb to 150Kb (yet both books still have it as 1010 x 1347 in dimension). What I really want is an EXACT replica of the 32MB book, but with chapter markers. Anyone know of a way of doing it, even if it means using something other than Calibre? |
![]() |
![]() |
![]() |
#5 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,662
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
If you really want to change it as little as possible, you should using KindleUnpack on the original, tweak the output in the way you desire, and then re-compile it with Kindlegen. Although I'm not sure that Kindlegen will allow such large image files. Perhaps someone with more calibre knowledge than me will be along shortly to tell you how to turn off the image changes. |
|
![]() |
![]() |
![]() |
#6 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 392
Karma: 1008414
Join Date: Jun 2011
Device: Kindle
|
Apparently I can add chapters by doing the following, which avoids any conversion, but I' not sure where to start!
"unpack using the Mobiunpack script copy-paste the TOC section and then regexp or otherwise search/replace the HTML bits surrounding the chapter titles and anchor links to create an NCX fill in the PlayOrder and other necessary pieces regenerate the Mobi, linking your new NCX" |
![]() |
![]() |
![]() |
#7 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 392
Karma: 1008414
Join Date: Jun 2011
Device: Kindle
|
It also seems Calibre is DELETING images, not just optimising them. I'm sure there's a very good reason and I'm sure Kovid can explain it. Maybe Calibre can see that although they're inside the .mobi file, they actually aren't referenced anywhere in the HTML file, and are therefore pointless/surplus to requirements?
|
![]() |
![]() |
![]() |
#8 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,889
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 392
Karma: 1008414
Join Date: Jun 2011
Device: Kindle
|
I tried the Tablet setting and it STILL comes out as 8MB!
|
![]() |
![]() |
![]() |
#10 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,196
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Unreferenced images are deleted, which you will see if you look at the conversion log. And no, there is no way to do a conversion and just add a ToC.
Conversion *will* alter your file. Though if I was you, I'd stop worrying about the changes conversion is doing to your file, there are more important things to worry about in life. And just for completeness if your file was in a modern ebook format like epub of azw3, you could use the edit toc tool to "just" add a table of contents. |
![]() |
![]() |
![]() |
#11 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 392
Karma: 1008414
Join Date: Jun 2011
Device: Kindle
|
Thanks.
Having looked inside the HTML, there IS a Table of Contents in there already, but for some reason no chapter markers! |
![]() |
![]() |
![]() |
#12 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,196
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yeah because the MOBI output plugin resamples jpeg images, to ensure they work with older devices, that have limitations on maximum image size. That much should be obvious by just comparing the images in the unpacked mobi. Same resolution, smaller size => resampled image.
|
![]() |
![]() |
![]() |
#13 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 392
Karma: 1008414
Join Date: Jun 2011
Device: Kindle
|
Ok, it looks like there's no easy way to add chapter markers without converting...
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
File size update | Ritonri | Calibre | 8 | 10-06-2013 01:20 PM |
Reload file size | ptom | Library Management | 10 | 03-28-2011 02:10 PM |
LRF File Size | Gros'Land | Sony Reader | 1 | 09-24-2010 10:14 AM |
search for file size | alexxx | Calibre | 9 | 06-30-2010 01:21 PM |
Book (file) size | irenas | Astak EZReader | 15 | 04-15-2010 03:21 PM |