Giter VIP home page Giter VIP logo

epub-package.dart's Introduction

epub_package

Yet another EPub package for Flutter.

Why another EPUB package?

You may already noticed, there is an awesome epub package on pub that works for all dart platforms. Why I created another EPub package only for Flutter?

Here is the story:

When I started my 2nd experimental Flutter project which is a reader for EPub, I immediately installed epub package. Soon I realized the package depends on archive to handle ZIP format. Everything was fine until I found I have a huge EPub file which is over 120MiB. It requires a lot of memory because archive has to read all data into memory. That's unacceptable to a mobile app.

And here we are. This package also has implemented a very simple reader requires 16KiB memory buffer to parse Zip files.

According to a fantastic answer from stackoverflow:

The ISO/IEC 21320-1:2015 standard for file containers is a restricted zip format, such as used in Java archive files (.jar), Office Open XML files (Microsoft Office .docx, .xlsx, .pptx), Office Document Format files (.odt, .ods, .odp), and EPUB files (.epub). That standard limits the compression methods to 0 and 8, as well as other constraints such as no encryption or signatures.

My implementation is just good enough for EPub files.

Another issue I noticed later was the disk speed of some devices. My low-price Android phone from 2016 spends ~10s to parse the Zip file. Unfortunately, Zip format just bundles files one by one. There is no a single block to hold all files information. That means the internal storage has only ~10M/s reading speed. No wonder it's cheap! Even the files had just been read, it still required 4s+. So I had to find a way to avoid parse large files every time. That's why I introduced another functionality to load from json when it's unchanged.

So this is basically an EPub reader with small memory consumption.

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

epub-package.dart's People

Contributors

egust avatar tvolkert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

epub-package.dart's Issues

Update readme with examples

I'm fairly new into flutter like so many others these days ;)

Now I cant see a way of how to use this in my flutter project. The package doesn't seem to have any Widgets which i could use in the first place.

Please help me out.

Limitations & Scope for this project?

Hi I just noticed this package, I was wondering if this was purely a reader or is there a widget to display the content, flip through pages, bookmark and search, or if you had planned to implement this in the future?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.