Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle compressed sync data from Sync Clippings Helper #434

Closed
aecreations opened this issue Dec 27, 2023 · 1 comment
Closed

Handle compressed sync data from Sync Clippings Helper #434

aecreations opened this issue Dec 27, 2023 · 1 comment

Comments

@aecreations
Copy link
Owner

A forum poster suggested compressing the synced clippings data into ZIP format to bypass the 1 MiB limit imposed by the native messaging API[1] to allow more data to be synced. Forum post: https://groups.io/g/aecreations-help/message/48

This will require that the user upgrade Sync Clippings Helper to a newer version that supports compressed sync data. See related issue: aecreations/sync-clippings#18.

Clippings should request the synced data from Sync Clippings Helper by sending a new native message, get-compressed-synced-clippings. It should then unzip the sync data in the native message response before refreshing the data in the Synced Clippings folder.

If the user doesn't have the new version of Sync Clippings Helper installed, then show a error notification and display an error message in Clippings Manager, if open. Then, retry sync by sending the old native message get-synced-clippings to retrieve the normal, uncompressed sync data.

--
[1] https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging

@aecreations
Copy link
Owner Author

aecreations commented Jan 2, 2024

If using the Python gzip library in Sync Clippings Helper, then theoretically, the Compression Streams API can be used to decompress the data in Clippings: https://developer.mozilla.org/en-US/docs/Web/API/Compression_Streams_API.

This JavaScript API is available in Firefox 113 and newer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant