add new youtubedl dependency

This commit is contained in:
2024-11-05 15:29:49 +01:00
parent 584084c1bc
commit 60dc43fd9b
27 changed files with 2780 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
package youtube
type DecipherOperation func([]byte) []byte
func newSpliceFunc(pos int) DecipherOperation {
return func(bs []byte) []byte {
return bs[pos:]
}
}
func newSwapFunc(arg int) DecipherOperation {
return func(bs []byte) []byte {
pos := arg % len(bs)
bs[0], bs[pos] = bs[pos], bs[0]
return bs
}
}
func reverseFunc(bs []byte) []byte {
l, r := 0, len(bs)-1
for l < r {
bs[l], bs[r] = bs[r], bs[l]
l++
r--
}
return bs
}