---
title: ByteCountFormatStyle.Units
framework: foundation
role: symbol
role_heading: Structure
path: foundation/bytecountformatstyle/units
---

# ByteCountFormatStyle.Units

The units to use when formatting a byte count, such as kilobytes or gigabytes.

## Declaration

```swift
struct Units
```

## Topics

### Units

- [default](foundation/bytecountformatstyle/units/default.md)
- [all](foundation/bytecountformatstyle/units/all.md)
- [bytes](foundation/bytecountformatstyle/units/bytes.md)
- [kb](foundation/bytecountformatstyle/units/kb.md)
- [mb](foundation/bytecountformatstyle/units/mb.md)
- [gb](foundation/bytecountformatstyle/units/gb.md)
- [tb](foundation/bytecountformatstyle/units/tb.md)
- [pb](foundation/bytecountformatstyle/units/pb.md)
- [eb](foundation/bytecountformatstyle/units/eb.md)
- [zb](foundation/bytecountformatstyle/units/zb.md)
- [ybOrHigher](foundation/bytecountformatstyle/units/yborhigher.md)

## Relationships

### Conforms To

- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)
- [Hashable](swift/hashable.md)
- [OptionSet](swift/optionset.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SetAlgebra](swift/setalgebra.md)

## See Also

### Creating a byte count style

- [init(style:allowedUnits:spellsOutZero:includesActualByteCount:locale:)](foundation/bytecountformatstyle/init(style:allowedunits:spellsoutzero:includesactualbytecount:locale:).md)
