rolerzhang / RolerFileToolkit

Professional for Epub, Mobi
MIT License
14 stars 4 forks source link

ArgumentOutOfRangeException in Roler.Toolkit.File.Mobi.Compression.PalmDocCompression.Decompress #1

Closed stpatrick2016 closed 4 years ago

stpatrick2016 commented 4 years ago

Hey, first of all - nice work :) Opens most of the books I have. There are very few where I get an index out of range exception coming with this call stack:

at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at System.Collections.Generic.List`1.get_Item(Int32 index) at Roler.Toolkit.File.Mobi.Compression.PalmDocCompression.Decompress(Byte[] bytes) at Roler.Toolkit.File.Mobi.MobiReader.ReadText(Structure structure) at Roler.Toolkit.File.Mobi.MobiReader.Read()

Attaching one of such files for reproduction (zipped). The code is the simplest one:

using (var f = File.OpenRead(file_to_file))
{
    using (var mobiReader = new MobiReader(f))
    {
        var mobi = mobiReader.Read();
//...

Thanks and keep it up :)

rolerzhang commented 4 years ago

Hello, thank you for opening an issue. I will fix this problem in the next update. soon

rolerzhang commented 4 years ago

Roler.Toolkit.File.Mobi 1.0.1 published.