Searched refs:CHUNK_SIZE (Results 1 – 14 of 14) sorted by relevance
/packages/modules/Virtualization/authfs/src/fsverity/ |
D | builder.rs | 18 use crate::common::{divide_roundup, CHUNK_SIZE}; 22 const HASH_PER_PAGE: usize = CHUNK_SIZE as usize / HASH_SIZE; 66 let leaves_size = divide_roundup(new_file_size, CHUNK_SIZE); in resize() 109 debug_assert!(self.file_size <= CHUNK_SIZE && self.file_size > 0); in calculate_root_hash() 113 debug_assert_eq!((self.file_size - 1) / CHUNK_SIZE, n as u64); in calculate_root_hash() 114 let size_for_equivalent = n as u64 * CHUNK_SIZE; in calculate_root_hash() 197 let hash = Sha256Hasher::new()?.update(&vec![1u8; CHUNK_SIZE as usize])?.finalize()?; in merkle_tree_non_sequential() 200 tree.update_hash(1, &hash, CHUNK_SIZE * 2); in merkle_tree_non_sequential() 201 tree.update_hash(3, &hash, CHUNK_SIZE * 4); in merkle_tree_non_sequential() 202 tree.update_hash(0, &hash, CHUNK_SIZE); in merkle_tree_non_sequential() [all …]
|
D | verifier.rs | 23 use crate::common::{divide_roundup, CHUNK_SIZE}; 27 const ZEROS: [u8; CHUNK_SIZE as usize] = [0u8; CHUNK_SIZE as usize]; 50 let chunk_hash = hash_with_padding(&chunk, CHUNK_SIZE as usize)?; in verity_check() 61 Ok(hash_with_padding(&merkle_chunk, CHUNK_SIZE as usize)?) in verity_check() 76 let hashes_per_node = CHUNK_SIZE / Sha256Hasher::HASH_SIZE as u64; 83 let leaves_size_per_hash = CHUNK_SIZE * leaves_per_hash; 86 let level_size = nodes_at_level * CHUNK_SIZE; 97 let chunk_index = global_hash_offset / CHUNK_SIZE; 98 let hash_offset_in_chunk = (global_hash_offset % CHUNK_SIZE) as usize; 143 let mut buf = [0u8; CHUNK_SIZE as usize]; in new()
|
D | editor.rs | 59 use crate::common::{ChunkedSizeIter, CHUNK_SIZE}; 108 let mut orig_data = [0u8; CHUNK_SIZE as usize]; in new_hash_for_incomplete_write() 137 if current_size as u64 == CHUNK_SIZE { in new_chunk_hash() 173 ChunkedSizeIter::new(buf.len(), offset, CHUNK_SIZE as usize) in write_at() 181 let output_chunk_index = (output_offset / CHUNK_SIZE) as usize; in write_at() 182 let offset_from_alignment = (output_offset % CHUNK_SIZE) as usize; in write_at() 233 if size < merkle_tree.file_size() && size % CHUNK_SIZE > 0 { in resize() 234 let new_tail_size = (size % CHUNK_SIZE) as usize; in resize() 235 let chunk_index = size / CHUNK_SIZE; in resize() 237 let mut buf: ChunkBuffer = [0; CHUNK_SIZE as usize]; in resize() [all …]
|
D | common.rs | 22 use crate::common::{divide_roundup, CHUNK_SIZE}; 50 let hashes_per_node = CHUNK_SIZE / Sha256Hasher::HASH_SIZE as u64; in merkle_tree_height() 51 let hash_pages = divide_roundup(data_size, hashes_per_node * CHUNK_SIZE); in merkle_tree_height()
|
/packages/modules/Virtualization/authfs/src/ |
D | fusefs.rs | 36 use crate::common::{divide_roundup, ChunkedSizeIter, CHUNK_SIZE}; 104 fn blk_size() -> libc::c_int { CHUNK_SIZE as libc::c_int } 106 fn blk_size() -> libc::c_long { CHUNK_SIZE as libc::c_long } 139 offset / CHUNK_SIZE in offset_to_chunk_index() 151 let total = ChunkedSizeIter::new(size_to_read, offset, CHUNK_SIZE as usize).try_fold( in read_chunks() 158 let mut buf = [0u8; CHUNK_SIZE as usize]; in read_chunks() 164 let begin = (current_offset % CHUNK_SIZE) as usize; in read_chunks()
|
D | file.rs | 9 use crate::common::CHUNK_SIZE; 20 pub type ChunkBuffer = [u8; CHUNK_SIZE as usize];
|
D | common.rs | 18 pub const CHUNK_SIZE: u64 = 4096; constant
|
/packages/modules/Virtualization/authfs/src/file/ |
D | local_file.rs | 23 use crate::common::CHUNK_SIZE; 45 let start = chunk_index * CHUNK_SIZE; in read_chunk() 49 let end = min(self.size, start + CHUNK_SIZE); in read_chunk()
|
D | remote_file.rs | 23 use crate::common::CHUNK_SIZE; 36 let offset = i64::try_from(chunk_index * CHUNK_SIZE) in remote_read_chunk() 82 let offset = i64::try_from(chunk_index * CHUNK_SIZE) in read_chunk()
|
/packages/modules/adb/client/ |
D | incremental.cpp | 230 std::vector<char> child_stdout(CHUNK_SIZE); in wait_for_installation() 257 child_stdout.resize(buf_size + CHUNK_SIZE); in wait_for_installation()
|
D | commandline.cpp | 831 int opt = CHUNK_SIZE; in adb_sideload_legacy() 834 char buf[CHUNK_SIZE]; in adb_sideload_legacy() 837 unsigned xfer = (size > CHUNK_SIZE) ? CHUNK_SIZE : size; in adb_sideload_legacy() 862 #define SIDELOAD_HOST_BLOCK_SIZE (CHUNK_SIZE)
|
/packages/modules/DnsResolver/ |
D | DnsTlsSocket.cpp | 644 constexpr uint16_t CHUNK_SIZE = 2048; in readResponse() local 645 std::vector<uint8_t> discard(std::min(remainingBytes, CHUNK_SIZE)); in readResponse()
|
/packages/modules/adb/ |
D | adb.h | 207 #define CHUNK_SIZE (64 * 1024) macro
|
D | adb_listeners.cpp | 82 int rcv_buf_size = CHUNK_SIZE; in ss_listener_event_func()
|