Compare commits
No commits in common. "master" and "v0.3.0" have entirely different histories.
48
.github/workflows/docs.yml
vendored
Normal file
48
.github/workflows/docs.yml
vendored
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
name: Docs
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
concurrency:
|
||||||
|
group: deploy
|
||||||
|
cancel-in-progress: false
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Setup Rust
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Configure cache
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
- name: Setup pages
|
||||||
|
id: pages
|
||||||
|
uses: actions/configure-pages@v4
|
||||||
|
- name: Clean docs folder
|
||||||
|
run: cargo clean --doc
|
||||||
|
- name: Build docs
|
||||||
|
run: cargo doc --no-deps
|
||||||
|
- name: Add redirect
|
||||||
|
run: echo '<meta http-equiv="refresh" content="0;url=occule/index.html">' > target/doc/index.html
|
||||||
|
- name: Remove lock file
|
||||||
|
run: rm target/doc/.lock
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-pages-artifact@v3
|
||||||
|
with:
|
||||||
|
path: target/doc
|
||||||
|
deploy:
|
||||||
|
name: Deploy
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v4
|
22
.github/workflows/rust.yml
vendored
Normal file
22
.github/workflows/rust.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: Rust
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "master" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "master" ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --verbose
|
||||||
|
- name: Run tests
|
||||||
|
run: cargo test --verbose
|
942
Cargo.lock
generated
942
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "occule"
|
name = "occule"
|
||||||
version = "0.3.1"
|
version = "0.3.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
@ -13,7 +13,7 @@ wav = ["dep:hound"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
base64 = "0.22"
|
base64 = "0.22"
|
||||||
thiserror = "2.0"
|
thiserror = "1.0"
|
||||||
itertools = "0.13"
|
itertools = "0.13"
|
||||||
num-traits = "0.2"
|
num-traits = "0.2"
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ use crate::{Codec, Error};
|
|||||||
/// Reverses payload binary data and writes it ass-first past the end of the original data. A
|
/// Reverses payload binary data and writes it ass-first past the end of the original data. A
|
||||||
/// length marker is also prepended to the payload *before reversing* so the decoder knows how long
|
/// length marker is also prepended to the payload *before reversing* so the decoder knows how long
|
||||||
/// the payload is.
|
/// the payload is.
|
||||||
#[derive(Clone, Debug)]
|
|
||||||
pub struct BinaryReverseAppendixCodec;
|
pub struct BinaryReverseAppendixCodec;
|
||||||
|
|
||||||
impl Codec for BinaryReverseAppendixCodec {
|
impl Codec for BinaryReverseAppendixCodec {
|
||||||
|
@ -8,7 +8,7 @@ use crate::{Codec, Error};
|
|||||||
|
|
||||||
/// Codec for embedding data in a GLTF file "extras" entry. It uses the extras entry in the first
|
/// Codec for embedding data in a GLTF file "extras" entry. It uses the extras entry in the first
|
||||||
/// scene in the file and stores the data as base64.
|
/// scene in the file and stores the data as base64.
|
||||||
#[derive(Clone, Debug, Default)]
|
#[derive(Default)]
|
||||||
pub struct ExtrasEntryCodec;
|
pub struct ExtrasEntryCodec;
|
||||||
|
|
||||||
impl Codec for ExtrasEntryCodec {
|
impl Codec for ExtrasEntryCodec {
|
||||||
|
@ -6,7 +6,7 @@ use crate::{codec::Codec, Error};
|
|||||||
|
|
||||||
/// Codec for storing payload data in JPEG comment (COM) segments. Can store an arbitrary amount of
|
/// Codec for storing payload data in JPEG comment (COM) segments. Can store an arbitrary amount of
|
||||||
/// data, as long as the number of comment segments does not exceed u64::MAX.
|
/// data, as long as the number of comment segments does not exceed u64::MAX.
|
||||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
#[derive(Debug, PartialEq, Eq)]
|
||||||
pub struct JpegSegmentCodec {
|
pub struct JpegSegmentCodec {
|
||||||
/// Index of segment to insert comments at.
|
/// Index of segment to insert comments at.
|
||||||
pub start_index: usize,
|
pub start_index: usize,
|
||||||
|
@ -8,7 +8,7 @@ use crate::{codec::Codec, Error};
|
|||||||
/// in an image. This implementation reduces the colors in the carrier (irreversibly) in order to
|
/// in an image. This implementation reduces the colors in the carrier (irreversibly) in order to
|
||||||
/// allow a byte of data to fit in each pixel of the image. 3 bits of data are encoded per pixel,
|
/// allow a byte of data to fit in each pixel of the image. 3 bits of data are encoded per pixel,
|
||||||
/// and the 9th bit is used to signal the end of data.
|
/// and the 9th bit is used to signal the end of data.
|
||||||
#[derive(Clone, Debug, Default)]
|
#[derive(Debug, Default)]
|
||||||
pub struct LsbCodec;
|
pub struct LsbCodec;
|
||||||
|
|
||||||
impl Codec for LsbCodec {
|
impl Codec for LsbCodec {
|
||||||
|
@ -8,7 +8,6 @@ use num_traits::{FromBytes, ToBytes};
|
|||||||
|
|
||||||
/// A Least-Significant Bit (LSB) Codec for WAV files. Stores 1 bit of payload data in each sample
|
/// A Least-Significant Bit (LSB) Codec for WAV files. Stores 1 bit of payload data in each sample
|
||||||
/// of a WAV file. Supported sample formats are 8, 16, and 32-bit PCM, and 32-bit float.
|
/// of a WAV file. Supported sample formats are 8, 16, and 32-bit PCM, and 32-bit float.
|
||||||
#[derive(Clone, Debug)]
|
|
||||||
pub struct LsbCodec;
|
pub struct LsbCodec;
|
||||||
|
|
||||||
impl Codec for LsbCodec {
|
impl Codec for LsbCodec {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user