blob: 1c937f6550b39d304c5d33d7211b8d7b27cd4e69 [file] [log] [blame]
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use crate::properties::DEFAULT_ALIGNMENT;
/// `ExtractorOptions` tells what types of extents should be extracted and
/// controls the contents of the extracted image.
#[derive(PartialEq, Debug, PartialOrd, Clone, Copy)]
pub struct ExtractorOptions {
/// If `true`, forces dumping of blocks that are considered pii by the
/// storage software. Enable this with caustion.
pub force_dump_pii: bool,
/// If `true`, each extent's checksums are added to extracted image.
pub add_checksum: bool,
/// Forces alignment of extents and extractor metadata within extracted
/// image file.
pub alignment: u64,
/// Using gzip, compresses extracted image before writing it.
pub compress: bool,
impl Default for ExtractorOptions {
fn default() -> Self {
Self {
force_dump_pii: false,
add_checksum: false,
compress: true,