Open scrivener Files in iOS

An
AnnaV
Posts: 5
Joined: Sat Jan 09, 2021 2:37 pm
Platform: Mac

Wed Jan 13, 2021 1:12 pm Post

kewms wrote:[

If a project were treated as a single ZIP file, every single operation -- synchronization, backup, even routine saving -- would require uncompressing and recompressing the entire thing or, in the case of synchronization, transferring the whole thing across the internet. [...]

Katherine


you can insert/extract individual files from a zip archive without uncompressing and recompressing the whole thing - this has been possible for *ages*

You know what, nevermind. I'll just enjoy macOS scrivener and try to forget about anything else.

User avatar
lunk
Posts: 4360
Joined: Wed Aug 21, 2013 4:24 pm
Platform: Mac + iOS
Location: Sweden 64° N

Wed Jan 13, 2021 3:09 pm Post

AnnaV wrote:
kewms wrote:[

If a project were treated as a single ZIP file, every single operation -- synchronization, backup, even routine saving -- would require uncompressing and recompressing the entire thing or, in the case of synchronization, transferring the whole thing across the internet. [...]

Katherine


you can insert/extract individual files from a zip archive without uncompressing and recompressing the whole thing - this has been possible for *ages*

You know what, nevermind. I'll just enjoy macOS scrivener and try to forget about anything else.


Scrivenings mode require that several files are opened and edited, simultaneously, and simultaneosly changing the size of several files in a zip archive is not a simple task. It is prome to error, which could corrupt the whole project. It is also recommended that if a zip archive is edited that way, the metadata about the archive should not be part of the archive.
I am a user, writing non-fiction and science, using:
* Mac Scrivener 3 on a Macbook 12”, MacBook Pro 13”, and iMac 27”, running different OS.
* iOS Scrivener 1 on an iPhone 11 Pro, iPad Air 9.7”, and iPad Pro 12.9”, all running the latest iOS

User avatar
kewms
Posts: 6987
Joined: Fri Feb 02, 2007 5:22 pm
Platform: Mac

Wed Jan 13, 2021 5:01 pm Post

lunk wrote:Scrivenings mode require that several files are opened and edited, simultaneously, and simultaneosly changing the size of several files in a zip archive is not a simple task. It is prome to error, which could corrupt the whole project. It is also recommended that if a zip archive is edited that way, the metadata about the archive should not be part of the archive.


For this specific use case -- to facilitate synchronization -- you would also have to change files inside the ZIP archive across multiple physical devices, with potentially unstable network connections in between. That seems ... risky.

Katherine
Scrivener Support Team

User avatar
devinganger
Posts: 2437
Joined: Sat Nov 06, 2010 1:55 pm
Platform: Mac, Win + iOS
Location: Monroe, WA 98272
Contact:

Wed Jan 13, 2021 7:32 pm Post

AnnaV wrote:you can insert/extract individual files from a zip archive without uncompressing and recompressing the whole thing - this has been possible for *ages*


I guarantee you, somewhere in the background, hidden away from the user, there is a process that is doing *exactly* that.

How do I know?

Back when Microsoft first introduced the new Office document formats (.docx, .pptx, .xlsx, etc.) I was working for a company that did a lot of work with the Microsoft Exchange and Office teams. One of the fun things I got to do was write demos. And one of the demos I got to write was showing that using basic Java libraries (and no special library that knew about the new document structre), the average programmer could quickly and easily programmatically crack open the .docx file and modify the contents.

This was possible because the new Office file formats are simply a renamed .ZIP archive that contains a bunch of related files, just like you're advocating for Scrivener to do. If you take a .docx file and rename to *.zip, you can unarchive the file and examine the contents. However, if you are adding files to that archive, or even modifying existing files, in the background, you have to regenerate the entire ZIP file. There are routines in place to do this for you, but they all involve creating a new temporary ZIP file, then re-pointing the open file handle to the newly created ZIP file, renaming it, and updating the necessary pointers. Even the libraries that provide a memory-mapped interface to your ZIP archive do this in the back end. This would be a performance nightmare for a large subset of the Scrivener users who use it for larger files -- the performance hit would be quite noticeable and you wouldn't even have to get into the GB range before users started being adversely affected.

This is (as a non-employee looking in from the outside via the forums) one of the most consistently requested fixes for Scrivener that I have seen over my years as a Scrivener customer, especially since the introduction of the iOS version -- that Scrivener be made compatible with iCloud syncing. It has to be causing a significant amount of time and energy for L&L to deal with these requests. I am positive that KB in particular has researched *every* potential way to make the Scrivener file format more iCloud-friendly without having to sacrifice the other key design principles that have driven the design of Scrivener's project format and if they haven't made the changes necessary, there are valid (if disappointing to us) reasons why.
--
Devin L. Ganger
Not a L&L employee; opinions are those of my cat
Life has a way of moving you past wants and hopes