Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cbiffle/catibo
/ functions
Functions
97 in github.com/cbiffle/catibo
⨍
Functions
97
◇
Types & classes
34
↓ 102 callers
Method
get
Decodes the `f32` from little-endian.
src/lib.rs:191
↓ 19 callers
Method
next
(&mut self)
src/rle.rs:128
↓ 8 callers
Function
parse_bytes
(buf: &[u8], offset: u32, len: u32)
src/input.rs:314
↓ 6 callers
Function
next_byte_as_usize
( bytes: &mut impl Iterator<Item = u8>, )
src/rle.rs:277
↓ 6 callers
Method
next_word
Produces the next 32-bit word in the keystream. XOR this with data to encrypt or decrypt.
src/crypto.rs:91
↓ 4 callers
Method
encryption_key
Encryption key, or 0 if none.
src/input.rs:101
↓ 4 callers
Method
resolution
Printer resolution in pixels along x, y axes.
src/input.rs:109
↓ 3 callers
Method
aa_levels
Updates the user antialiasing setting that will be recorded. Doing this properly requires some care -- for 1bpp representations, this should match th
src/output.rs:231
↓ 3 callers
Function
crypt9f
Encrypts or decrypts `data` using the 9f cipher with `key` and `iv`.
src/crypto.rs:134
↓ 2 callers
Method
bot_exposure_s
Updates the exposure time in seconds for bottom layers.
src/output.rs:255
↓ 2 callers
Method
bot_layer_count
Updates the number of layers considered to be "bottom."
src/output.rs:261
↓ 2 callers
Method
bot_lift_dist_mm
Updates the lift distance, in millimeters, for the platform to withdraw after printing a bottom layer.
src/output.rs:300
↓ 2 callers
Method
bot_lift_speed_mmpm
Updates the lift speed, in millimeters per minute, for the platform to withdraw after printing a bottom layer.
src/output.rs:307
↓ 2 callers
Method
bot_light_off_time_s
Updates the light-off time, in seconds, after bottom layers.
src/output.rs:275
↓ 2 callers
Method
bot_pwm_level
Updates the backlight PWM setting for bottom layers.
src/output.rs:293
↓ 2 callers
Function
crypt86
Encrypts or decrypts `data` using the 86 cipher with `key` and `iv`.
src/crypto.rs:107
↓ 2 callers
Function
decode_565
(value: u16)
src/rle.rs:489
↓ 2 callers
Function
encode_565
(p: (u8, u8, u8))
src/rle.rs:537
↓ 2 callers
Function
encode_rle7a
Returns an iterator that yields the RLE7a encoded version of `pixels` until `pixels` is exhausted.
src/rle.rs:425
↓ 2 callers
Method
exposure_s
Updates the exposure time in seconds for normal layers.
src/output.rs:249
↓ 2 callers
Method
layer_height_mm
Layer height in millimeters.
src/input.rs:137
↓ 2 callers
Method
layer_table_count
Number of printed layers.
src/input.rs:85
↓ 2 callers
Method
level_set_count
Number of repetitions of printed layers in the layer table.
src/input.rs:93
↓ 2 callers
Method
lift_dist_mm
Updates the lift distance, in millimeters, for the platform to withdraw after printing a normal layer.
src/output.rs:314
↓ 2 callers
Method
lift_speed_mmpm
Updates the lift speed, in millimeters per minute, for the platform to withdraw after printing a normal layer.
src/output.rs:321
↓ 2 callers
Method
light_off_time_s
Updates the light-off time, in seconds, after normal layers.
src/output.rs:268
↓ 2 callers
Method
machine_type
Updates the machine type that will be recorded in the file.
src/output.rs:184
↓ 2 callers
Method
mirror
Updates the mirroring setting that will be recorded. `0` is normal, `1` is `LCD_mirror` (the default).
src/output.rs:192
↓ 2 callers
Method
overall_height_mm
Updates the overall printed model height in millimeters.
src/output.rs:243
↓ 2 callers
Function
parse_file
Examines the structure of `buf` and parses it into a `Layout`. This does almost no checking of the file's contents. It only ensures that the file is
src/input.rs:178
↓ 2 callers
Method
print_mass_g
Updates the estimated mass of resin required, in grams.
src/output.rs:340
↓ 2 callers
Method
print_price
Updates the estimated cost of resin required, in whatever currency unit the user has currently selected. (Currency units are not stored in the file.)
src/output.rs:348
↓ 2 callers
Method
print_time_s
Updates the estimate of the print duration, in seconds.
src/output.rs:281
↓ 2 callers
Method
print_volume_ml
Updates the estimated volume of resin required, in milliliters.
src/output.rs:334
↓ 2 callers
Method
printer_out_mm
Updates the expected output volume of the printer, measured in millimeters along the `[x, y, z]` axes.
src/output.rs:355
↓ 2 callers
Method
pwm_level
Updates the backlight PWM setting for normal layers.
src/output.rs:287
↓ 2 callers
Method
retract_speed_mmpm
Updates the speed, in millimeters per minute, for the platform to reapproach the vat after lifting.
src/output.rs:328
↓ 1 callers
Function
decode
(data: &[u8])
src/bin/phz.rs:79
↓ 1 callers
Function
decode_bilevel_slice
Low-level decoding of a bilevel slice, with possible antialiasing. This function is somewhat complex. `stack` is a vector of iterators over *separat
src/input.rs:402
↓ 1 callers
Function
decode_multilevel_slice
Decodes a multilevel (grayscale) slice, with optional encryption. This is dramatically simpler than decoding a bilevel antialiased slice. `data` is
src/input.rs:511
↓ 1 callers
Function
decode_phz_slice
Decodes an encoded/encrypted image slice in phz format.
src/input.rs:555
↓ 1 callers
Function
decode_rle15
Decodes pixels encoded in RLE15 format. This will pull bytes from `bytes` as needed to decode a single run. If `bytes` is exhausted at entry to this
src/rle.rs:486
↓ 1 callers
Function
decode_rle7
Decodes a run of pixels in the RLE7 scheme. Runs can be encoded as anywhere between 1 and 5 bytes. This function will draw bytes from the `bytes` ite
src/rle.rs:263
↓ 1 callers
Function
decode_rle7a
Returns an iterator that yields runs of pixels in the RLE7a scheme until `bytes` is exhausted.
src/rle.rs:403
↓ 1 callers
Function
decompress_all_layers
( parsed: &catibo::input::Layout<'_>, )
src/bin/catibo-convert.rs:237
↓ 1 callers
Function
encode_rle1
Collects a run of matching pixels from `bytes` and encodes them into a run in the RLE1 scheme. RLE1 runs can only be up to 127 bytes in length, so if
src/rle.rs:198
↓ 1 callers
Function
encode_rle15
Encodes a run of identical-ish pixels in the RLE15 scheme. RLE15 encodes RGB555 pixels, while our input is 24-bit, so the input will get quantized be
src/rle.rs:533
↓ 1 callers
Function
encode_rle7
Encodes a run of identical-ish pixels into the RLE7 scheme. RLE7 is a 7-bit scheme, so the LSB of pixels is ignored. Any encoded pixels are consumed
src/rle.rs:325
↓ 1 callers
Function
encode_rle7_slice
Quantizes and encodes 8bpp samples into an RLE7-encoded slice with optional encryption. `data` is a peekable iterator over the samples. `key` is the
src/output.rs:27
↓ 1 callers
Function
encode_rle7a_slice
Encodes an 8bpp slice into RLE7a format. RLE7a takes pains not to cross half-scanline boundaries, which will be inferred from the provided `width`. I
src/output.rs:54
↓ 1 callers
Method
encryption
Which encryption method, if any, do files with this magic use?
src/lib.rs:117
↓ 1 callers
Function
format_from_ext
(ext: &str)
src/bin/catibo-convert.rs:231
↓ 1 callers
Method
header_style
Which header style does a file with this magic use?
src/lib.rs:103
↓ 1 callers
Method
large_preview
Updates the (encoded) large preview image.
src/output.rs:368
↓ 1 callers
Method
large_preview_offset
File offset of `ImageHeader` for large preview image.
src/input.rs:61
↓ 1 callers
Method
layer
Appends a layer.
src/output.rs:398
↓ 1 callers
Method
layer_table_offset
File offset of table of `LayerHeader` records.
src/input.rs:77
↓ 1 callers
Method
small_preview
Updates the (encoded) small preview image.
src/output.rs:383
↓ 1 callers
Method
small_preview_offset
File offset of `ImageHeader` for small preview image.
src/input.rs:69
↓ 1 callers
Method
write
Gathers up all the information provided to the builder and generates a file thru `out`.
src/output.rs:416
Method
as_slice
Views this run as a slice for I/O purposes.
src/rle.rs:390
Function
crypt86_u32s
Encrypts or decrypts `data` using the 86 cipher with `key` and `iv`.
src/crypto.rs:99
Function
crypt9f_u32s
Encrypts or decrypts `data` using the 9f cipher with `key` and `iv`.
src/crypto.rs:126
Function
decode_image
( width: u32, height: u32, data: &[u8], )
src/input.rs:360
Function
decode_rle1
Decodes a single byte of the RLE1 scheme into a run of 8-bit gray pixels. RLE1 is a bilevel scheme, so "on" pixels are translated to level `0xFF`, an
src/rle.rs:102
Function
encode_image
(image: &image::ImageBuffer<image::Rgb<u8>, C>)
src/output.rs:74
Function
encode_rle7a_basic
()
src/rle.rs:595
Method
encryption_key
Updates the file-level encryption key that will be recorded. This key is not secret; it's recorded right in the file header for all to see. `0` means
src/output.rs:210
Method
encryption_mode
Updates the encryption mode that will be recorded. This field is poorly understood; it defaults to 0 for file formats that have not been observed usi
src/output.rs:201
Method
fmt
(&self, f: &mut std::fmt::Formatter)
src/lib.rs:148
Method
fmt
(&self, f: &mut core::fmt::Formatter)
src/rle.rs:236
Method
fmt
(&self, f: &mut std::fmt::Formatter)
src/input.rs:159
Method
for_86_key_and_iv
Creates a key stream for a given key and initialization vector using the 86 cipher.
src/crypto.rs:70
Method
for_9f_key_and_iv
Creates a key stream for a given key and initialization vector using the 9f cipher.
src/crypto.rs:81
Method
for_revision
Creates a builder for a file with the given flavor. The `version` is, in practice, always 2.
src/output.rs:150
Method
from
(inner: I)
src/rle.rs:117
Method
from
(e: rle::RleError)
src/input.rs:353
Method
from_str
(s: &str)
src/lib.rs:130
Function
hexdump
occasionally useful
src/bin/phz.rs:97
Method
is_version_ok
Checks whether a given version number is recognized for files with this magic number.
src/lib.rs:88
Method
layer_height_mm
Updates the layer height in millimeters.
src/output.rs:237
Method
level_set_count
Updates the number of times each level set (layer data) is repeated. For 1bpp representations, this should match the `aa_levels`, which should in tur
src/output.rs:222
Function
main
()
src/bin/catibo-convert.rs:37
Function
main
()
src/bin/phz.rs:21
Function
main
()
src/bin/catibo-inspect.rs:14
Method
new
Encodes an `f32` in little-endian. Note that chances are very good this is a no-op, since the computer you're using is likely to be natively little-e
src/lib.rs:186
Function
parse_slice
( buf: &[u8], offset: u32, len: u32, )
src/input.rs:285
Function
parse_type
( buf: &[u8], offset: u32, )
src/input.rs:272
Function
parse_type_prefix
( buf: &[u8], offset: u32, len: u32, )
src/input.rs:299
Method
remaining_run
Gets the number of pixels remaining in the current run.
src/rle.rs:144
Method
resolution
Updates the resolution of the printer, in pixels along `[x, y`].
src/output.rs:362
Function
run_iter
()
src/rle.rs:584
Method
uses_aa_levels
Checks whether files with this magic number are expected to use level-based AA representation, where slices are multiplied.
src/lib.rs:95
Method
variants
Produces variant names for Clap compatibility, without requiring Clap in the library.
src/lib.rs:112
Method
volume
Printer output volume in mm.
src/input.rs:121
Method
write_encoded_image
( image: &Image, mut out: impl io::Write + io::Seek, )
src/output.rs:613
Method
write_record
( record: &impl AsBytes, mut out: impl io::Write + io::Seek, )
src/output.rs:604