filename

package
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2025 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package filename provides utilities for encoder.

Index

Constants

This section is empty.

Variables

View Source
var ErrCorrupted = errors.New("file name corrupt")

ErrCorrupted is returned if a provided encoded filename cannot be decoded.

View Source
var ErrUnsupported = errors.New("file name possibly generated by future version of rclone")

ErrUnsupported is returned if a provided encoding may come from a future version or the file name is corrupt.

Functions

func Decode

func Decode(s string) (string, error)

Decode an encoded string.

func DecodeBytes

func DecodeBytes(table byte, data []byte) (string, error)

DecodeBytes will decode raw id and data values.

func Encode

func Encode(s string) string

Encode will encode the string and return a base64 (url) compatible version of it. Calling Decode with the returned string should always succeed. It is not a requirement that the input string is valid utf-8.

func EncodeBytes

func EncodeBytes(s string) (table byte, payload []byte)

EncodeBytes will compress the given string and return a table identifier and a payload.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL