<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/Measurement/AttributedStyle/ByteCount/init(style:allowedUnits:spellsOutZero:includesActualByteCount:locale:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation11MeasurementVAASo11NSDimensionCRbzrlE15AttributedStyleVAASo24NSUnitInformationStorageCRszrlE9ByteCountV5style12allowedUnits13spellsOutZero014includesActualiJ06localeAKyAI__GAA0ij6FormatE0V0E0O_AS0M0VS2bAA6LocaleVtcfc"
  },
  "title" : "init(style:allowedUnits:spellsOutZero:includesActualByteCount:locale:)"
}
-->

# init(style:allowedUnits:spellsOutZero:includesActualByteCount:locale:)

Initializes an attributed byte count format style.

```
init(style: Measurement<UnitType>.AttributedStyle.ByteCount.Style, allowedUnits: Measurement<UnitType>.AttributedStyle.ByteCount.Units, spellsOutZero: Bool, includesActualByteCount: Bool, locale: Locale)
```

## Parameters

`style`

The style of byte count to express, such as memory or file system storage.

`allowedUnits`

The units the format style can use to express the byte count.

`spellsOutZero`

A Boolean value that indicates whether the format style should spell out zero-byte values as text, like `Zero kB`.

`includesActualByteCount`

A Boolean value that indicates whether the format style should include the exact byte count, in addition to expressing it in terms of units. For example, `1 kB (1,024 bytes)`.

`locale`

The locale to use to format the numeric part of the byte count.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)