Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

feat: disable compression

thecodrr22d2950f24fe
diff --git a/packages/core/api/sync/collector.js b/packages/core/api/sync/collector.js
index 76f0cc0e1..8696ffb5c 100644
--- a/packages/core/api/sync/collector.js
+++ b/packages/core/api/sync/collector.js
@@ -24,10 +24,6 @@ class Collector {
};
}
- shouldCompress(itemType) {
- return itemType === "tiny";
- }
-
async collect(lastSyncedTimestamp, force) {
this._lastSyncedTimestamp = lastSyncedTimestamp;
this.key = await this._db.user.getEncryptionKey();
@@ -44,11 +40,7 @@ class Collector {
_serialize(item) {
if (!item) return;
- return this._db.context.encrypt(
- this.key,
- JSON.stringify(item),
- this.shouldCompress(item.type)
- );
+ return this._db.context.encrypt(this.key, JSON.stringify(item));
}
_collect(array) {
diff --git a/packages/core/database/storage.js b/packages/core/database/storage.js
index a0baf727f..1cf731cfd 100644
--- a/packages/core/database/storage.js
+++ b/packages/core/database/storage.js
@@ -27,8 +27,8 @@ export default class Storage {
return this.storage.getAllKeys();
}
- encrypt(password, data, compress) {
- return this.storage.encrypt(password, data, compress);
+ encrypt(password, data) {
+ return this.storage.encrypt(password, data);
}
decrypt(password, cipher) {