Source File
memory.go
Belonging Package
github.com/andybalholm/brotli
package brotli/* Copyright 2016 Google Inc. All Rights Reserved.Distributed under MIT license.See file LICENSE for detail or copy at https://opensource.org/licenses/MIT*//*Dynamically grows array capacity to at least the requested sizeT: data typeA: arrayC: capacityR: requested size*/func brotli_ensure_capacity_uint8_t( *[]byte, *uint, uint) {if * < {var uint = *if == 0 {=}for < {*= 2}if cap(*) < int() {var []byte = make([]byte, )if * != 0 {copy(, (*)[:*])}* =} else {* = (*)[:]}* =}}func brotli_ensure_capacity_uint32_t( *[]uint32, *uint, uint) {var []uint32if * < {var uint = *if == 0 {=}for < {*= 2}if cap(*) < int() {= make([]uint32, )if * != 0 {copy(, (*)[:*])}* =} else {* = (*)[:]}* =}}
![]() |
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |