From 7de65118c2043395180f23c8b6a65683be1114e1 Mon Sep 17 00:00:00 2001 From: Josh Wilson Date: Tue, 17 Sep 2024 08:59:59 +0900 Subject: [PATCH 1/2] feat: default size back to 1mb --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 5e566d589..0115aaa0a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -126,8 +126,8 @@ pub use xor_name; /// The minimum size (before compression) of data to be self-encrypted, defined as 3B. pub const MIN_ENCRYPTABLE_BYTES: usize = 3 * MIN_CHUNK_SIZE; -/// The maximum size (before compression) of an individual chunk of a file, defined as 500kiB. -pub const MAX_CHUNK_SIZE: usize = 512 * 1024; +/// The maximum size (before compression) of an individual chunk of a file, defined as 1024kiB. +pub const MAX_CHUNK_SIZE: usize = 1024 * 1024; /// The minimum size (before compression) of an individual chunk of a file, defined as 1B. pub const MIN_CHUNK_SIZE: usize = 1; /// Controls the compression-speed vs compression-density tradeoffs. The higher the quality, the From 2731f94723ba2ada1bbdfbf0917bea0562b5c604 Mon Sep 17 00:00:00 2001 From: Josh Wilson Date: Tue, 17 Sep 2024 09:07:55 +0900 Subject: [PATCH 2/2] chore: fix slippy warnings, remove box-pointers it has been deprecated --- benches/lib.rs | 6 +----- src/lib.rs | 1 - tests/lib.rs | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/benches/lib.rs b/benches/lib.rs index a7e9c9330..e3f67a5af 100644 --- a/benches/lib.rs +++ b/benches/lib.rs @@ -41,11 +41,7 @@ unused_qualifications, variant_size_differences )] -#![allow( - box_pointers, - missing_copy_implementations, - missing_debug_implementations -)] +#![allow(missing_copy_implementations, missing_debug_implementations)] use criterion::{BatchSize, Bencher, Criterion}; use self_encryption::{decrypt_full_set, encrypt, test_helpers::random_bytes}; diff --git a/src/lib.rs b/src/lib.rs index 0115aaa0a..b7d7e1fed 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -80,7 +80,6 @@ unused_results )] #![allow( - box_pointers, missing_copy_implementations, missing_debug_implementations, variant_size_differences, diff --git a/tests/lib.rs b/tests/lib.rs index fca253f97..0533684f1 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -43,7 +43,6 @@ unused_results )] #![allow( - box_pointers, missing_copy_implementations, missing_debug_implementations, variant_size_differences