block

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileBlockCache

type FileBlockCache struct {
	// contains filtered or unexported fields
}

func New

func New() *FileBlockCache

New 实例

func (*FileBlockCache) GetBlocks

func (c *FileBlockCache) GetBlocks() [][]byte

GetBlocks 获取文件块空间

func (*FileBlockCache) ReadBlocks

func (c *FileBlockCache) ReadBlocks(filePath string, blockSizeMb int) ([][]byte, error)

ReadBlocks 读取文件块列表

func (FileBlockCache) SetSizeMb

func (c FileBlockCache) SetSizeMb(sizeMb int)

SetSizeMb 设置切块单位,默认1MB

func (*FileBlockCache) ToBase64 added in v1.0.19

func (c *FileBlockCache) ToBase64(filePath string, blockSizeMB int) ([]string, error)

ToBase64 读取文件块并转换为base64

Jump to

Keyboard shortcuts

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