filename

package
v0.0.0-...-1dc401f Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 7 Imported by: 0

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