diff options
| author | 2023-09-25 11:33:10 +0100 | |
|---|---|---|
| committer | 2023-09-25 11:33:10 +0100 | |
| commit | 380d83f9a968da60419e0afbd8b37bd50ba953de (patch) | |
| tree | 0fb6d3645c6620ad6c5381d1a680b412eee2e732 /vendor/github.com/abema/go-mp4/util | |
| parent | [bugfix] support both CollectionPage AND OrderedCollectionPage in status repl... (diff) | |
| download | gotosocial-380d83f9a968da60419e0afbd8b37bd50ba953de.tar.xz | |
[chore]: Bump github.com/abema/go-mp4 from 0.13.0 to 1.0.0 (#2222)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/abema/go-mp4/util')
| -rw-r--r-- | vendor/github.com/abema/go-mp4/util/io.go | 30 | ||||
| -rw-r--r-- | vendor/github.com/abema/go-mp4/util/string.go | 42 |
2 files changed, 0 insertions, 72 deletions
diff --git a/vendor/github.com/abema/go-mp4/util/io.go b/vendor/github.com/abema/go-mp4/util/io.go deleted file mode 100644 index 1e4681186..000000000 --- a/vendor/github.com/abema/go-mp4/util/io.go +++ /dev/null @@ -1,30 +0,0 @@ -package util - -import ( - "bytes" - "io" -) - -func ReadString(r io.Reader) (string, error) { - b := make([]byte, 1) - buf := bytes.NewBuffer(nil) - for { - if _, err := r.Read(b); err != nil { - return "", err - } - if b[0] == 0 { - return buf.String(), nil - } - buf.Write(b) - } -} - -func WriteString(w io.Writer, s string) error { - if _, err := w.Write([]byte(s)); err != nil { - return err - } - if _, err := w.Write([]byte{0}); err != nil { - return err - } - return nil -} diff --git a/vendor/github.com/abema/go-mp4/util/string.go b/vendor/github.com/abema/go-mp4/util/string.go deleted file mode 100644 index b38251bb3..000000000 --- a/vendor/github.com/abema/go-mp4/util/string.go +++ /dev/null @@ -1,42 +0,0 @@ -package util - -import ( - "strconv" - "strings" - "unicode" -) - -func FormatSignedFixedFloat1616(val int32) string { - if val&0xffff == 0 { - return strconv.Itoa(int(val >> 16)) - } else { - return strconv.FormatFloat(float64(val)/(1<<16), 'f', 5, 64) - } -} - -func FormatUnsignedFixedFloat1616(val uint32) string { - if val&0xffff == 0 { - return strconv.Itoa(int(val >> 16)) - } else { - return strconv.FormatFloat(float64(val)/(1<<16), 'f', 5, 64) - } -} - -func FormatSignedFixedFloat88(val int16) string { - if val&0xff == 0 { - return strconv.Itoa(int(val >> 8)) - } else { - return strconv.FormatFloat(float64(val)/(1<<8), 'f', 3, 32) - } -} - -func EscapeUnprintable(r rune) rune { - if unicode.IsGraphic(r) { - return r - } - return rune('.') -} - -func EscapeUnprintables(src string) string { - return strings.Map(EscapeUnprintable, src) -} |
