主要变更: - RDP 远程桌面:新增 backend/pkg/rdp(RDP 引擎 + credssp/display/rle/trace)、 backend/controller/rdp*(连接/凭证/文件/会话/实时)、frontend RDP 组件与 API - Windows SMB 文件传输:backend/pkg/winsmb - 云账单同步:backend/pkg/billingsync + billing_sync/aliyun_billing,前端账单详情 - Agent CLI Kubernetes 工具:kubernetes_action/get、pod_execute/logs - 服务器导入助手:server_import_helpers、ImportCredentialSettings - 国际化与组件重构(cloud/deploy/monitor/server/system 等多模块) - 清理编译产物二进制:移除 backend/server、backend/agent/bin/aiops-agent-* - .gitignore:新增 backend/agent/ 与 .cache/(避免 334MB go-build 缓存误入库) Co-Authored-By: Claude <noreply@anthropic.com>
59 lines
1.1 KiB
Go
59 lines
1.1 KiB
Go
package rle
|
|
|
|
func decompress4(output *[]uint8, width, height int, input []uint8, size int) bool {
|
|
var (
|
|
code int
|
|
onceBytes, total int
|
|
)
|
|
|
|
code = CVAL(&input)
|
|
rle := code&0x10 != 0
|
|
noAlpha := code&0x20 != 0
|
|
|
|
if !rle {
|
|
return false
|
|
}
|
|
|
|
total = 1
|
|
out := *output
|
|
|
|
if noAlpha {
|
|
// No alpha plane in the stream; fill alpha channel with 0xFF.
|
|
for i := 3; i < len(out); i += 4 {
|
|
out[i] = 0xFF
|
|
}
|
|
} else {
|
|
var ok bool
|
|
onceBytes, ok = processPlane(&input, width, height, output, 3)
|
|
if !ok {
|
|
return false
|
|
}
|
|
total += onceBytes
|
|
}
|
|
|
|
var ok bool
|
|
onceBytes, ok = processPlane(&input, width, height, output, 2)
|
|
if !ok {
|
|
return false
|
|
}
|
|
total += onceBytes
|
|
|
|
onceBytes, ok = processPlane(&input, width, height, output, 1)
|
|
if !ok {
|
|
return false
|
|
}
|
|
total += onceBytes
|
|
|
|
onceBytes, ok = processPlane(&input, width, height, output, 0)
|
|
if !ok {
|
|
return false
|
|
}
|
|
total += onceBytes
|
|
|
|
return true
|
|
}
|
|
|
|
// DecompressInto decompresses bitmap data into dst, reusing dst if it has
|
|
// sufficient capacity (size = width*height*bpp). If dst is nil or too small
|
|
// a new slice is allocated. Returns the (re)used output slice.
|