goldforge 0.8.1

Library for handling file formats used by GoldSrc and related engines.
Documentation
// Copyright 2025-2026 Gabriel Bjørnager Jensen.
//
// This Source Code Form is subject to the terms of
// the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you
// can obtain one at:
// <https://mozilla.org/MPL/2.0/>.

//! The [`LumpDescriptor`] type.

#![cfg(feature = "alloc")]

use crate::wad::{Compression, LumpType};

/// A descriptor for a lump.
///
/// Objects of this type are consumed by
/// [`Builder::with_lump`].
///
/// [`Builder::with_lump`]: crate::wad::Builder::with_lump
#[derive(Clone, Debug, Default)]
pub struct LumpDescriptor<'a> {
	/// The name of the lump.
	pub name: &'a str,

	/// The type of the lump.
	pub lump_type: Option<LumpType>,

	/// The compressed lump data.
	pub data: &'a [u8],

	/// The used compression format.
	pub compression: Option<Compression>,
}