aboutsummaryrefslogtreecommitdiff
path: root/matroska/src/size.rs
diff options
context:
space:
mode:
Diffstat (limited to 'matroska/src/size.rs')
-rw-r--r--matroska/src/size.rs25
1 files changed, 0 insertions, 25 deletions
diff --git a/matroska/src/size.rs b/matroska/src/size.rs
deleted file mode 100644
index 7ef0de9..0000000
--- a/matroska/src/size.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- This file is part of jellything (https://codeberg.org/metamuffin/jellything)
- which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
- Copyright (C) 2025 metamuffin <metamuffin.org>
-*/
-#[derive(Debug, Clone, Copy, PartialEq, Eq)]
-pub enum EbmlSize {
- Exact(usize),
- Unknown,
-}
-impl EbmlSize {
- pub fn from_vint((value, len): (u64, usize)) -> EbmlSize {
- if value == ((1 << (7 * len)) - 1) {
- Self::Unknown
- } else {
- Self::Exact(value as usize)
- }
- }
- pub fn some(self) -> Option<usize> {
- match self {
- EbmlSize::Exact(s) => Some(s),
- EbmlSize::Unknown => None,
- }
- }
-}