Comments (12)
@mgautierfr Might be interesting as your are polishing zimmerge/zimpatch Kiran's code
from libzim.
@mgautierfr The problem here is that this is not written in the ZIM. Could we add it as a new header?
from libzim.
No :)
It would be a change (potentially incompatible) in the zim format.
And cluster is a concept internal to the zim format (and the libzim). A user code as no access to the cluster. There is no api to access it.
So, knowing its size is useless.
from libzim.
Yes, I ask for a new API. Considering that the Header can be extended without breaking the format, a default value shoudl just set.
from libzim.
There is no way to access cluster outside of libzim. And I want it to stay that way. (The same with dirent) Internal things must stay internal.
What is your use case ? How this would help you ?
from libzim.
@mgautierfr zimrecreate
and zimpatch
/zimdiff
from libzim.
How they could use it ?
zimrecreate
do not need it at all.
from libzim.
These tools should should be able to know what is the ZIM cluster size to be able to then recreate one with the same clustersize.
from libzim.
If you provide the same content and compress the same way, the cluster should have the same size.
from libzim.
@mgautierfr How do I guaranty "the same way" if I ignore the cluster size? Considering the cluster is a variable in the compression process.
from libzim.
I cannot tell you how to avoid to use the cluster size if you don't tell me how you would use it.
Honestly, I don't think is is possible to zimpatch to guaranty this "same way" using libzim. I've already change the way zim's creator decides (and when) to close a cluster and this is totally internal. There is no way to force a specific set of articles to go in the same cluster.
We have one naive heuristic to determine which articles go in which cluster but this may change in the future. We may want to regroup articles per mimetype (because compressing content of the same type may be more efficient), or try different order of the article and take the best compression ratio, or regroup css and js together because there is a lot of chance that they are shared by all articles, or....
We cannot guaranty that articles will be written in the same clusters the same way the x years old implementation was doing it.
And I don't want to guaranty that.
from libzim.
We don't have the information about a cluster size (except by decompressing it and see how much have been read).
libzim, even internally, never try to get the size of a cluster. So we will not provide a public API to get it.
from libzim.
Related Issues (20)
- Been able to load split ZIM file (chunks) by filedescriptor HOT 11
- Can't get libzim version >= 8.0.0 HOT 1
- Mess with `zim::Archive::getEntryByPath(const std::string& path)` HOT 12
- Bump minor version of zimfile format
- Looking for direction on building for Windows HOT 3
- Add option for disabling tests HOT 8
- Proposal: Harvest the power of xapian to provide advanced search and filter capabilities HOT 3
- Allow extern `getFd()` to get file descriptors from Java for Kiwix Android HOT 5
- Document ZIM major and minor versions HOT 6
- Release 9.2.0
- Impossible to drop entries from the kiwix::Downloader's cache HOT 1
- Last version of libzim seems to no be present in debian repo HOT 1
- Fix ambiguities around the usage of URLs in ZIM file format HOT 32
- LibZim 9.1 under macOS throws exception that cannot be caught HOT 11
- Rename UrlPtrList to PathPtrList
- (Xapian) Exception mgmt + documentation HOT 2
- Corrupted ZIM leads to crash on macOS HOT 1
- Release 9.2.1
- Better opening of split zim archive. HOT 2
- Error message is slightly misleading if ZIM file can not be open
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libzim.