Skip to documentation
SLOP

tiny.pdf.filter

Reference tiny.pdf filter

Defined in tiny.pdf.

API (13)

Actions

Public operations.

Types and contracts

Public types and contracts.

No direct callersNo direct callstiny.pdffilter
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/pdf/src/filter/decode.zig:13

zig
pub fn bytesFromStream(    storage: *storage_mod.Storage,    filter_name: ?[]const u8,    params: model.Predictor,    data: []const u8,) model.Error![]u8 {    const regions = try storage.acquire(data.len);    errdefer storage.reset();    const name = filter_name orelse return copy(regions.output, data);    if (!std.mem.eql(u8, name, "FlateDecode")) return error.UnsupportedFilter;    const inflated = try inflate(regions, data);    return unpredict(params, inflated);}
Called byCallstest sourcelib.pdf.src.filter.testtest: Activated PDF filter storage pe...test sourcelib.pdf.src.filter.testtest: PDF filter DEFLATE overflow sta...test sourcelib.pdf.src.filter.testtest: PDF filter decode errors releas...test sourcelib.pdf.src.filter.testtest: PDF filter decodes Flate and PN...test sourcelib.pdf.src.filter.testtest: PDF filter rejects unsupported ...+2 moreprivate sourcelib.pdf.src.filter.decodecopyprivate sourcelib.pdf.src.filter.decodeinflateprivate sourcelib.pdf.src.filter.decodeunpredictprivate sourcelib.trace.src.profiling.storageresetfilterbytesFromStream
Static calls · unresolved targets: 0 · external targets: 1.

Source: lib/pdf/src/filter/model.zig:82

zig
pub fn nameOf(value: object.Value) DecodeError!?[]const u8 {    return switch (value) {        .null => null,        .name => |name| name,        else => error.UnsupportedFilter,    };}
Called byCallsNo direct callstest sourcelib.pdf.src.filter.modeltest: PDF filter shape helpers unwrap...filternameOf
Static calls · unresolved targets: 0 · external targets: 0.

Source: lib/pdf/src/filter/model.zig:90

zig
pub fn paramsOf(value: object.Value) DecodeError!Predictor {    return switch (value) {        .null => .{},        .dict => |dict| Predictor.fromDict(dict),        else => error.UnsupportedFilter,    };}
Called byCallsNo direct callersFilterPredictorfromDictfilterparamsOf
Static calls · unresolved targets: 0 · external targets: 0.

Source: lib/pdf/src/filter/model.zig:71

zig
pub fn single(value: object.Value) DecodeError!object.Value {    return switch (value) {        .array => |items| switch (items.len) {            0 => .null,            1 => items[0],            else => error.UnsupportedFilter,        },        else => value,    };}
Called byCallsNo direct callstest sourcelib.pdf.src.filter.modeltest: PDF filter shape helpers unwrap...filtersingle
Static calls · unresolved targets: 0 · external targets: 0.

Source: lib/pdf/src/filter/root.zig

zig
const capacity_mod = @import("capacity.zig");const decode_mod = @import("decode.zig");const model = @import("model.zig");const storage_mod = @import("storage.zig");pub const Bounds = model.Bounds;pub const Predictor = model.Predictor;pub const DecodeError = model.DecodeError;pub const Exhaustion = model.Exhaustion;pub const Error = model.Error;pub const Limits = capacity_mod.Limits;pub const Capacity = capacity_mod.Capacity;pub const Storage = storage_mod.Storage;pub const Status = storage_mod.Status;pub const single = model.single;pub const nameOf = model.nameOf;pub const paramsOf = model.paramsOf;pub const bytesFromStream = decode_mod.bytesFromStream;

Source: lib/pdf/src/root.zig:13

zig
pub const filter = @import("filter/root.zig");

Complete caller list for filter.bytesFromStream

7 direct callers.

Audit

Definitions5
Public names5
Members0
Version26.7.0
Revisiondaab053ee433