// IsCompressionEnabled indicates an expected call of IsCompressionEnabled
189337
func (mr *MockEncoderMockRecorder) IsCompressionEnabled() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsCompressionEnabled", reflect.TypeOf((*MockEncoder)(nil).IsCompressionEnabled))
}
957868
func (dec *Decoder) isCustomType() (bool, error) {
	if dec.customTypes == nil {
		return false, nil
	}
	if v, ok := dec.customTypes[dec.curr.Type()]; ok {
		if len(v.fields) > 0 {
			for i := range v.fields {
				// check if the current field is registered
				// in the fields of the custom type
				if v.fields[i].field.Elem() == dec.curr {
					va, err := v.fields[i].fun(dec.values)
					if err != nil {
						return true, err
					}
					dec.curr.Set(reflect.ValueOf(va))
					return true, nil
				}
			}
		}
		// check if the default function exists for fields not specific
		if v.fun != nil {
			va, err := v.fun(dec.values)
			if err != nil {
				return true, err
			}
			dec.curr.Set(reflect.ValueOf(va))
			return true, nil
		}
	}
	return false, nil
}
483968
func (s *Channel) SetCompressionType(v string) *Channel {
	s.CompressionType = &v
	return s
}
144421
func (r *runtimeVerbose) isEnabled(from string) bool {
	isEnabled := false
	for _, reg := range r.VerboseRegs {
		if reg.MatchString(from) {
			isEnabled = true
			break
		}
	}
	return isEnabled
}
154560
func IsEnabledVersion(v unversioned.GroupVersion) bool {
	_, found := enabledVersions[v]
	return found
}
689087
func detectCompressionType(req *Request, resp *Response) (found bool, compressionType string, compressionKind WriteFlusher) {
	if Config.BoolDefault("results.compressed", false) {
		acceptedEncodings := strings.Split(req.GetHttpHeader("Accept-Encoding"), ",")

		largestQ := 0.0
		chosenEncoding := len(compressionTypes)

		// I have fixed one edge case for issue #914
		// But it's better to cover all possible edge cases or
		// Adapt to https://github.com/golang/gddo/blob/master/httputil/header/header.go#L172
		for _, encoding := range acceptedEncodings {
			encoding = strings.TrimSpace(encoding)
			encodingParts := strings.SplitN(encoding, ";", 2)

			// If we are the format "gzip;q=0.8"
			if len(encodingParts) > 1 {
				q := strings.TrimSpace(encodingParts[1])
				if len(q) == 0 || !strings.HasPrefix(q, "q=") {
					continue
				}

				// Strip off the q=
				num, err := strconv.ParseFloat(q[2:], 32)
				if err != nil {
					continue
				}

				if num >= largestQ && num > 0 {
					if encodingParts[0] == "*" {
						chosenEncoding = 0
						largestQ = num
						continue
					}
					for i, encoding := range compressionTypes {
						if encoding == encodingParts[0] {
							if i < chosenEncoding {
								largestQ = num
								chosenEncoding = i
							}
							break
						}
					}
				}
			} else {
				// If we can accept anything, chose our preferred method.
				if encodingParts[0] == "*" {
					chosenEncoding = 0
					largestQ = 1
					break
				}
				// This is for just plain "gzip"
				for i, encoding := range compressionTypes {
					if encoding == encodingParts[0] {
						if i < chosenEncoding {
							largestQ = 1.0
							chosenEncoding = i
						}
						break
					}
				}
			}
		}

		if largestQ == 0 {
			return
		}

		compressionType = compressionTypes[chosenEncoding]

		switch compressionType {
		case "gzip":
			compressionKind = gzip.NewWriter(resp.GetWriter())
			found = true
		case "deflate":
			compressionKind = zlib.NewWriter(resp.GetWriter())
			found = true
		}
	}
	return
}
804281
func (t *Type) IsAssignable() bool {
	if t.IsPrimitive() {
		return true
	}
	if t.Kind == Struct {
		for _, m := range t.Members {
			if !m.Type.IsAssignable() {
				return false
			}
		}
		return true
	}
	return false
}
1183408
func (l *ModuleLevels) IsEnabledFor(module string, level api.Level) bool {
	return level <= l.GetLevel(module)
}
932255
func (config *Config) ColorEnabled() ColorSetting {
	if config.ENV.CFColor != "" {
		val, err := strconv.ParseBool(config.ENV.CFColor)
		if err == nil {
			return config.boolToColorSetting(val)
		}
	}

	val, err := strconv.ParseBool(config.ConfigFile.ColorEnabled)
	if err != nil {
		return ColorAuto
	}
	return config.boolToColorSetting(val)
}
746766
func (c *Config) IsSecurityEnabled() bool {
	val, ok := c.backend.Lookup("client.BCCSP.security.enabled")
	if !ok {
		return defEnabled
	}
	return cast.ToBool(val)
}
1110156
func (c *Command) IsAvailableCommand() bool {
	if len(c.Deprecated) != 0 || c.Hidden {
		return false
	}

	if c.HasParent() && c.Parent().helpCommand == c {
		return false
	}

	if c.Runnable() || c.HasAvailableSubCommands() {
		return true
	}

	return false
}
1303031
func (e *Engine) SetCompactionsEnabled(enabled bool) {
	if enabled {
		e.enableSnapshotCompactions()
		e.enableLevelCompactions(false)
	} else {
		e.disableSnapshotCompactions()
		e.disableLevelCompactions(false)
	}
}
103945
func (s *SignaturesProtectedBranch) GetEnabled() bool {
	if s == nil || s.Enabled == nil {
		return false
	}
	return *s.Enabled
}
340537
func (fh *FileHeader) isZip64() bool {
	return fh.CompressedSize64 >= uint32max || fh.UncompressedSize64 >= uint32max
}
340963
func (e *Element) IsEnabled() (bool, error) {
	e.lock.RLock()
	defer e.lock.RUnlock()

	if !e.ready {
		return false, &ElementNotReadyErr{}
	}
	disabled, ok := e.attributes["disabled"]
	// if the attribute doesn't exist, it's enabled.
	if !ok {
		return true, nil
	}
	if disabled == "true" || disabled == "" {
		return false, nil
	}
	return true, nil
}
237808
func (o ObjectInfo) IsCompressed() bool {
	_, ok := o.UserDefined[ReservedMetadataPrefix+"compression"]
	return ok
}
840648
func (b *RouteBuilder) ContentEncodingEnabled(enabled bool) *RouteBuilder {
	b.contentEncodingEnabled = &enabled
	return b
}