1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-24 00:32:47 +00:00
mylar/lib/rarfile/doc/faq.rst
evilhero 2623bbcbaf IMP: Updated CT to a newer version - changed to use rarfile, fixes size invalid errors with some cbr's encountered during conversions, IMP: Search and Post-Processing Queues now added in order to queue up all searches/post-processing in sequence instead of loading lists and iterating through it and encountering various lock-related errors, IMP: In most cases, will now post-process directly against comicid/issueid/storyarcid instead of relying on relationship via nzb/torrent, FIX: realigned some checkboxes on series detail page, FIX: in configuration, indicated that ComicRN cannot be used when Completed Download Handling is enabled for a client now, FIX: Fix for issues named as 'special' that are part of the annuals section, but would not work in various portions (also will allow for naming differences in the future hopefully), FIX: Will now trap error properly when file cannot be located during dupecheck so that post-processing can continue without error, FIX: Fixed newznab test option on configuration screen so that it will return the correct response (previous was an invalid api endpoint), FIX: When retrieving image for storyarcs would error when no image was present and stop the process, FIX: accounted for some incorrect newznab responses that would return a non-api endpoint when retrieving via rss, which resulted in invalid nzbs, FIX: in some cases, weekly pull snatches would not update properly on the weekly page due to some db values not being written
2018-06-14 13:07:39 -04:00

87 lines
3.3 KiB
ReStructuredText

rarfile FAQ
===========
.. contents:: Table of Contents
What are the dependencies?
--------------------------
It depends on ``unrar`` command-line utility to do the actual decompression.
Note that by default it expect it to be in ``PATH``. If unrar
launching fails, you need to fix this.
Alternatively, :mod:`rarfile` can use bsdtar_ from libarchive_ as
decompression backend, but that is a bit problematic as bsdtar_ does not support
all RAR features.
.. _bsdtar: https://github.com/libarchive/libarchive/wiki/ManPageBsdtar1
.. _libarchive: http://www.libarchive.org/
It depends on cryptography_ or PyCrypto_ modules to process
archives with password-protected headers.
.. _cryptography: https://pypi.python.org/pypi/cryptography
.. _PyCrypto: https://pypi.python.org/pypi/pycrypto
Does it parse ``unrar`` output to get archive contents?
-------------------------------------------------------
No, :mod:`rarfile` parses RAR structure in Python code. Also it can
read uncompressed files from archive without external utility.
Will rarfile support wrapping unrarlib/unrar.dll/unrar.so in the future?
------------------------------------------------------------------------
No. The current architecture - parsing in Python and decompression with
command line tools work well across all interesting operating systems
(Windows/Linux/MacOS), wrapping a library does not bring any advantages.
Simple execution of command-line tools is also legally simpler situation
than linking with external library.
How can I get it work on Windows?
---------------------------------
On Windows the ``unrar.exe`` is not in ``PATH`` so simple ``Popen("unrar ..")`` does not work.
It can be solved several ways:
1. Add location of ``unrar.exe`` to PATH.
2. Set :data:`rarfile.UNRAR_TOOL` to full path of ``unrar.exe``.
3. Copy ``unrar.exe`` to your program directory.
4. Copy ``unrar.exe`` to system directory that is in PATH, eg. ``C:\Windows``.
How to avoid the need for user to manually install rarfile/unrar?
-----------------------------------------------------------------
Include ``rarfile.py`` and/or ``unrar`` with your application.
Will it support creating RAR archives?
--------------------------------------
No. RARLAB_ is not interested in RAR becoming open format
and specifically discourages writing RAR creation software.
In the meantime use either Zip_ (better compatibility) or 7z_ (better compression)
format for your own archives.
.. _RARLAB: http://www.rarlab.com/
.. _Zip: https://en.wikipedia.org/wiki/ZIP_%28file_format%29
.. _7z: https://en.wikipedia.org/wiki/7z
What is the USE_EXTRACT_HACK?
-----------------------------
RarFile uses ``unrar`` to extract compressed files. But when extracting
single file from archive containing many entries, ``unrar`` needs to parse
whole archive until it finds the right entry. This makes random-access
to entries slow. To avoid that, RarFile remembers location of compressed
data for each entry and on read it copies it to temporary archive containing
only data for that one file, thus making ``unrar`` fast.
The logic is only activated for entries smaller than :data:`rarfile.HACK_SIZE_LIMIT`
(20M by default). Bigger files are accessed directly from RAR.
Note - it only works for non-solid archives. So if you care about
random access to files in your archive, do not create solid archives.