booster / com.didiglobal.booster.compression

Package com.didiglobal.booster.compression

提供了图像资源压缩相关的 API

Types

CompressionOptions

open class CompressionOptions

CompressionReport

  1. relative path
  2. original size
  3. compressed size
  4. reduced size
  5. formatted reduced size
  6. reduction percentage
  7. original size
  8. original path
typealias CompressionReport = Octuple<String, Long, Long, Long, String, String, String, File>

CompressionResult

Compression Result

typealias CompressionResult = Quadruple<File, Long, Long, File>

CompressionResults

typealias CompressionResults = CopyOnWriteArrayList<CompressionResult>

CompressionTaskCreator

Represents the creator of CompressImages

interface CompressionTaskCreator

CompressionTaskCreatorFactory

Represents a factory of CompressionTaskCreator

interface CompressionTaskCreatorFactory

CompressionTool

Represents a compression tool

abstract class CompressionTool : CompressionTaskCreatorFactory

SimpleCompressionTaskCreator

Represents a simple implementation of CompressionTaskCreator

class SimpleCompressionTaskCreator : CompressionTaskCreator

Extensions for External Classes

java.util.concurrent.CopyOnWriteArrayList

Properties

decimal

val decimal: (Number) -> String

percentage

val percentage: (Number) -> String

Functions

isFlatPng

fun isFlatPng(file: File): Boolean

isFlatPngExceptRaw

fun isFlatPngExceptRaw(file: File): Boolean

isPng

fun isPng(file: File): Boolean

isPngExceptRaw

fun isPngExceptRaw(file: File): Boolean